Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app crash on first start on FreeraspReactNative.onInvalidCallback() #42

Closed
nikhilborana opened this issue Feb 15, 2024 · 8 comments · Fixed by #44
Closed

app crash on first start on FreeraspReactNative.onInvalidCallback() #42

nikhilborana opened this issue Feb 15, 2024 · 8 comments · Fixed by #44
Assignees
Labels
bug Something isn't working

Comments

@nikhilborana
Copy link

nikhilborana commented Feb 15, 2024

Screenshot 2024-02-15 at 7 43 19 PM

getting the crash on first time open only. Install this build from testflight.

Working fine on development.

@nikhilborana nikhilborana added the bug Something isn't working label Feb 15, 2024
@msikyna
Copy link
Member

msikyna commented Feb 15, 2024

Hello @nikhilborana ,
thank you for reporting this! We will look at it soon.

Kind regards,
Talsec team

@nikhilborana
Copy link
Author

it crashed on both debug and release schema. only for the first time.

"react-native": "0.73.4",
"freerasp-react-native": "^3.6.0",

@LydGol90
Copy link

LydGol90 commented Feb 20, 2024

Hi, yes seeing a few of these crashes on our production app on iOS only (so far).

"react-native": "0.72.6",
"freerasp-react-native": "^3.6.0",

Using very simple implementation of useFreeRasp() as in docs

I wasn't sure if this was related to this code in FreeraspReactNative.swift, which deliberately kills the app

 /**
     * We never send an invalid callback over our channel.
     * Therefore, if this happens, we want to kill the app.
     */
    @objc(onInvalidCallback)
    private func onInvalidCallback() -> Void {
        abort()
    }

Many thanks

@tompsota
Copy link
Member

Hi,

we found a bug that kills the app when deviceID check is fired on iOS, instead of launching your reaction. Fix will be ready later today.

Thanks for bringing this up.

@tompsota tompsota mentioned this issue Feb 20, 2024
@nikhilborana
Copy link
Author

You're welcome!!
Thanks for your swift action and dedication to improving the functionality of the library are truly commendable.

@tompsota
Copy link
Member

Just released v3.6.1 which should fix the problem.

@nikhilborana
Copy link
Author

sorry to bother you guys, but now its giving Device Id not ok for the first time open and if I kill the app and reopen it is working fine.

@tompsota
Copy link
Member

Hi @nikhilborana,

The deviceID can be triggered after app reinstallation if none other app from the same vendor is installed on the device.
First run compares the old DeviceID with current DeviceID and updates the DeviceID. When the app is opened for the second time, the current DeviceID is compared to the DeviceID from the first run, so callback is not triggered anymore. You can learn more in the wiki here.

So if you are reinstalling the only app installed from you, it is expected that deviceID is triggered.

If you don't mind whether app was reinstalled, then it is usually fine to ignore this callback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants