-
Notifications
You must be signed in to change notification settings - Fork 585
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
Xcode pauses inside JavaScriptCore when using the Chrome debugger #1095
Comments
I decided to have a look at the terminal window and there seems to be an error that might be related to the above:
|
@compojoom This is with a local Realm Object Server? How did you set up the User accounts? that error indicates your login is failing, looking at the code, this: Is suspect - if you are using username/password a username must be in email format. |
Thanks for the reply @ianpward |
I don't know why this is set to "waiting for user", but since you guys are waiting on me here I am :) I'm no longer login with username & password but with an access_token. I've written an authenticator for auth0: https://www.npmjs.com/package/realm-auth0-authenticator Despite that I see the same behavior in the app. As I said the app is not crashing, but it pauses its execution at the above code lines and waits for me to hit the continue program execution button in xCode. I have the feeling that the app only does this when the server isn't able to authenticate the user. For example - if I send an expired token to the server and the server returns an error then most of the time the app stalls. If I always send a valid access_token, then everything seems fine. |
When the program pauses can you take a detailed backtrace of the application? I guess you can expand all the threads in the Xcode Debug Navigator and take a screenshot? I'm afraid that the disassembly you've provided is really not helpful. |
Could you also expand Thread 194 - the React Native JS execution thread? |
Thanks. Can you disable remote JS debugging and see what happens? |
Yep, disabling JS debugging seems to resolve the issue. I started the same dummy project yesterday evening, disabled remote JS debugging. Made several refreshes of the app and let it run over the night - no hanging. |
Sigh. This seems to be yet another issue related to the React Native debugger :/ |
Out of curiosity, does this also happen when using remote debugging but with a different iOS version? |
@fealebenpae - interesting. I'm working now already an hour with iOS 9.3 simulator and I haven't stumbled on the issue. How did you come with this idea? |
Welp, different iOS versions have different JavaScriptCore versions so if debugging is doing something to upset one version of JavaScriptCore, another version might be more forgiving. |
I'm seeing this as well. Makes debugging a realm-enabled app very difficult |
Would just like to confirm that switching to a simulator running iOS 9.3 does indeed get rid of the problem for me, too. |
Same issue here |
1 similar comment
Same issue here |
Any updates on this? Almost impossible to debug as it stops every time i run it after 20-30 secs. That's my window for debugging at the moment lol |
@danieldelouya If you can, debugging in iOS 9.3 does fix this (for me). If not, sorry :( |
@sampurcell93 Might have to do that then. Hope they fix it for > 9.3 soon |
What alternatives are people using? This situation is so awful I'm considering migrating the organization to something else in the meantime. I can't understand how this project can be under active development while debugging is nigh impossible. |
@jeremyong I agree it's super irritating, but it literally takes 30 seconds to open Xcode and run your app via an iOS 9.3 simulator, which indeed works flawlessly. Hope they fix the issue soon for newer iOS versions though :) |
And what do you do if you want to test newer device compatibility or introduce features that require ios 10 and 11... |
Agreed on the latter point, although for release testing and for testing device/OS compatibility you should never really be using remote JS debugging anyway, since the javascript environment isn't real-world. The greater issue for me is that disabling the debugger or using an older iOS might only hide the problem. The crash appears to be telling us we're trying to release memory that isn't ours. A different JS environment might not be smart enough to detect/prevent that - it doesn't mean that the bug doesn't exist. |
I cant believe this bug is opened for over 11 months and uncommented for 6 months. I’ve just now been bitten by it. Any news? |
This is slightly crazy. The Realm team have built out a whole react-native version of there product and it's basically unusable with the main developer tool. I get it we shouldn't be using chrome debugger but the reality is that this is what is used by the community. Reverting to 9.3 is not really an option either as that version of iOS is so old now. If any product owner, product managers see this your investment in react-native support is being completely wasted while this bug exists. |
@scottwio We are fully aware of the unfortunate issue and are really sorry about the implications. |
@bmunkholm thanks for the response. Reading through this thread it seemed like the issue was just being ignored but I can now see you are fully on top of it. Such a shame though I was looking to use Realm for a project this means it's not really an option unless we write some sort of native bridging code ): |
@scottwio Fully understand. We do however have many users that are happily getting around this - perhaps debugging in different ways or not experiencing this as badly as others. |
Currently, the debugger will crash the app after a couple of reloads, so it's not even like you can just make do with the slower debugging. Chrome debugger doesn't seem to be an option at all. If it was just slow I could live with it but the app crashing after a couple of reloads is the main blocker. |
@scottwio Sadly, I had to largely abandon Chrome debugging. When developing new features for my app, I must add (and then remember to remove) many console.log statements, then use adb logcat or xcode to develop and debug. It is a significant hit on efficient development. A single package ( realm ) prevents efficient Chrome debugging of anything. |
getting same issue. any workaround ? |
Ok, 4 years after posting this I'm reinvestigating if realm could be a good fit for another app. Originally when I stumbled on this bug we switched over to firestore... Is this still a bug in Realm? I see the issue is in the backlog, but are there any plans to resolve it? Or is it already resolved? |
@compojoom If this was only a bug, it would have been fixed. Unfortunately, it's an architectural consequence. Debugging with Safari however works reasonable well. Please see the issue I referred to above: #1095 (comment). |
➤ Brian Munkholm commented: Closing as this is resolved with Hermes support. |
I'm experimenting with realm and react native. I have the following RN code:
When I use the app for no apparent reason the app stalls and xcode is showing the following:
Also what I noticed is that my app doesn't update when I do an update on the remote Database. Basically my change event is not triggered, but if I relaunch the app - I have the correct data.
The text was updated successfully, but these errors were encountered: