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

Crash with EXC_BAD_ACCESS on _jsMessageThread->runonQueue(onComplete) After Multiple Logins/Logouts #384

Closed
dheeraj-bartwal opened this issue Aug 19, 2024 · 4 comments

Comments

@dheeraj-bartwal
Copy link

dheeraj-bartwal commented Aug 19, 2024

We are experiencing a crash with the exception EXC_BAD_ACCESS when calling _jsMessageThread->runonQueue(onComplete) after multiple login and logout cycles. The crash log indicates an attempt to dereference a null pointer, which appears to be linked to the object lifecycle issues with _jsMessageThread.
Steps to Reproduce:

Perform a login.
Log out.
Repeat the login/logout process several times.
Observe the crash occurring intermittently.
Expected Behavior:
The application should handle multiple login and logout cycles without crashing. Specifically, the _jsMessageThread object should be managed correctly across these cycles.

Actual Behavior:
The application crashes with an EXC_BAD_ACCESS error due to attempting to dereference a null pointer when accessing _jsMessageThread.

Crash Log:
Exception - This event
error
10:29:24.000
EXC_BAD_ACCESS: release >
Attempted to dereference null pointer.

Additional Information:
"SalesforceMobileSDK-iOS version": "12.0.1",
"react-native": "0.70.14",
"react-native-force": "git+https://github.com/forcedotcom/SalesforceMobileSDK-ReactNative.git#v11.1.0",

Screenshot 2024-08-19 at 10 10 58 PM
@wmathurin
Copy link
Contributor

You are mixing up versions: Mobile SDK 12.0.1 should use SalesforceMobileSDK-ReactNative#v12.0.1 which uses RN 0.73.6.
Did you run forcereact to generate your application?

@dheeraj-bartwal
Copy link
Author

@wmathurin Yes, I used forcereact to create the application. How can I downgrade SalesforceMobileSDK-iOS to version 11.1.0? When I create a new app using forcereact create, it defaults to SalesforceMobileSDK-iOS v12.1.0.

@wmathurin
Copy link
Contributor

wmathurin commented Aug 22, 2024

First uninstall forcereact (see doc).
Then install the 11.1.0 version by doing npm install [email protected].
Do npm install -g to install it globally.

@wmathurin
Copy link
Contributor

Closing issue - please check last comment. Re-open issue if it still happens (and you are using the most recent Mobile SDK 12.2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants