realm-js: failed to execute 'send' on 'xmlhttprequest'
hi, while trying to work with remote debugging (#562 and #571) i upgraded to rn 0.32 and now i’m seeing this when enabling the remote debugging:
Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'http://192.168.1.178:8082/create_session'.
i understand there’s some issues with remote debugging. the ip address is the ip of the android device
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 18
- Comments: 28 (4 by maintainers)
My guess is as follows. Running on a device and debugging fails because normally
adb forward tcp:8082 tcp:8082takes care of the correct redirection from device to host. Because you are debugging from chromehttp://<ip-address>:8082/create_sessionis an invalid url.I changed the following lines in
node_modules/realm/lib/browser/rpc.jsto
And now everything works fine (even when not debugging remotely) I hope this helps
react-native link realm doesn’t fix this issue
We are experiencing this same issue in the iOS simulator. Remote debugging just breaks for us.
Same issue here. Really need debugging on device to proceed with Realm.
Im using React 0.55.4 just installed realm, Trying to debug an iOS build from a Mac Facing the same issue, tried the fix above didn’t work, everything seems to be working fine if I don’t ‘debug remotely’, But I start getting these errors once I do try to debug remotely:
in my case, debugging of physical device is working, but emulator it is not working
The issue with crashing app at the first launch has found! It seems start from v2.23 there is a BUG in “/src/ios/platform.mm”
Here is missed
!sign in this IF:if ([manager createDirectoryAtPath:docsDir withIntermediateDirectories:YES attributes:nil error:&error])https://github.com/realm/realm-js/blob/master/src/ios/platform.mm#L78therefore after deletion of app from device at first launch this IF returned
TRUEand thethrow std::runtime_error(util::format("Failed to create directory \"%1\": %2", docsDir.UTF8String, error_description(error).UTF8String));is fired and app crashes.This bug was created by this commit: https://github.com/realm/realm-js/commit/9c6d26aa591d33cd9161cd40f389da33c340ccda#diff-2c49b41809c315e7530a10428f8a80f5
and I surprised that noone still did not create a ticket about this 😃
in my case on iOS 12.2 (realm 2.26.1 and/or 2.28)
or
...localhost:8083...do not work.
App crashes on first launch after removing and re-installing app from the phone, on both Debug and Release builds.
Partly fixed by downgrade realm to 2.2.10 BUT it also contain this issue for iOS 12.2: https://github.com/realm/realm-js/issues/2305
So without fork it is not possible to use realm in my project! “Nice” work 😃
Selman555 thank you for answer. it worked for me. Now i can debug android in windows
still have same issue at android device …QQ