-
Notifications
You must be signed in to change notification settings - Fork 47
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
Error thrown #7
Comments
Please provide more information
|
Thanks for your reply. Unfortunately we're not using Relay in the browser yet - just React Native (which could be why this is an issue). This is the stack trace it is reporting: This is the setup I'm using to test:
To get the error I'm just turning off my local graphql server to simulate the network being down. The I've looked at the promise coming out of both the default network layer and this network layer and they look exactly the same to me. If this isn't something you've seen before and there's nothing jumping to mind about why it might be happening I can continue to debug - I was hoping it was something you might have an idea about though! |
Thanks for your detailed information. I do not have react-native env to debug this issue. But you may! I think problem in Please let me know about your investigations. |
Removing that line didn't fix the problem but I have worked out that it only happens when using remote debugging (i.e. via Chrome). If I use the native javascript engine for the app the problem doesn't happen - so at least it's not an issue that will impact production. I'll close this issue but if you want me to try anything else I'm happy to help. Thanks - and sorry if I wasted any of your time! |
Too strange, cause as you say that default network layer (DNL) does not throw error with remote debugging, or does? If DNL not produce error, but this network layer do it. So I forced to re-open this issue due difference in behavior. It should be fixed, or described in readme. Anyway if I can not fix it, then somebody may do this and the opened issue only help with it. |
You're correct - the DNL does not throw the error in debug mode so there is definitely a difference. I've searched the issues on the react native project and can't see anything in there. |
@sdcooke please check new version 1.2.0 Watwg-fetch was removed. May be it produces error. |
I still get the error, I'm afraid. |
I'm also having this issue with |
Gotcha! Bump new version in hour. @roman01la be ready to test it. Write additionally, when publish on npm. |
Thanks for quick response! |
1.3.0 published It was some tricky problem. I hope it was solved. In new Promise((resolve, reject) =>
fetch(...)
.then(res => resolve(res))
.catch(err => reject(err))
); I suppose that arrow function (provided to promise constructor) catch thrown error and call @roman01la @sdcooke please try new version, and write about results with your apps. |
Still the same error :( |
Agrrrr. Work in the blind. I have not react-native environment. |
@roman01la I think it will be useful. |
I'm still seeing the same problem in 1.3.1 I'm afraid |
Bumped new version 1.3.6. |
I'm seeing the graphql errors being thrown with the latest version of this package. |
Same here. |
I've noticed a difference between this network layer and the default network layer. If there is a network error the render method of the Relay.Renderer is called with the error. In the default network layer nothing else is done, in this network layer the error is then thrown after the render function has been called so you can't silently handle it.
I can't work out exactly where it's being thrown from - is this something you're aware of?
The text was updated successfully, but these errors were encountered: