-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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] Object.setPrototypeOf(_this, ApolloError.prototype) on 2.2.8 #3236
Comments
+1 I'm also getting this error on Android when trying to do a simple mutation (create-react-native-app project) |
@seklyza Same here. Issue - android only. Are you using TS or something before RN babel? |
@alexmbp No. Just plain CRNA project. Not using TypeScript or something like that. |
+1, i think bundle.umd.js is using Object.setPrototypeOf which return undefined in Android.
See |
Any way to sidestep this for now ? |
As noted by the original author of this post:
|
Downgraded and not working :( any other solutions ? @lxcid , in what file do the changes you referred go ? Couldn´t find any realm package between mines. |
This is frustrating. Been trying to figure out what went wrong for the past few days. Downgraded mine as suggested but I still get the same old errors. As noted earlier by @doraeminemon , any sidestep would be appreciated. |
@chrisehlee what exact version did you put in your package.json when downgrading? make sure to pin, because otherwise it'll resolve latest. |
@dozoisch For clarity here's the relevant part of my package.json
|
@chrisehlee apollo-boost@0.1.4 depends on apollo-client@2.2.8, so you probably have both installed and is actually using 2.2.8, try downgrading apollo-boost to 0.1.3 instead. |
NB: I'm using wix/react-native-navigation and aws-amplify(-react-native).@FabricioCabeca I've downgraded every related package but I'm still stuck.
|
Apollo boost still require ^2.2.7 which means version 2.2.8 is installed for you. I did have similar issue. I’ve fixed it by forcing webpack to use root node_modules, but it brakes a lot. |
@alexmbp Woah, you're spot .. dug in and saw exactly what you said. |
Any solutions to this? I am using react-native with react-apollo |
@chrisehlee actually I've just downgraded apollo-boost and apollo-client, react-apollo is at 2.1.2, here are my deps, working fine here:
|
@FabricioCabeca I'm glad that worked for you and it's hard to go through all this hurdles .. however, any chance the official team is looking into this? |
ok, workaround works, next step is to fix setPrototypeOf... ...ref that might work... |
Running into this issue: apollographql/apollo-client#3236
* downgrade apollo to circumvent bug Running into this issue: apollographql/apollo-client#3236 * Fix network error catching apollographql/react-apollo#604 (comment) 5648596 * fix refetch/fetchmore handlers when null * make sure errors are passed through on nested HOCs * improve error handling on profile * fix linter * update snapshots * add audio error handling
@atkit Hello, any word yet? |
@chrisehlee In the meantime, I'm doing the same as @FabricioCabeca and bump down |
@melloflavio Thanks. |
For me Downgrade apollo-boost doesn't work. By the way, who use apollo-boost don't need apollo-client. It's built in. I'm using React-native (Had this with expo too). |
@MichelDiz downgrading |
That's odd and boring, I'll have to do the same. PS: Downgrade for what FabricioCabeca says is working, doesn't work at all. This happens only on Android. IOS works great. Two days gone now. |
Here is my workaround
The patch has been created from the commande line from PR PR#3306 :
|
@padupuy Thank you very much! u saved my sanity! |
Where to write the apollo.patch ? |
1 - Create a simple file with the name "apollo.patch" at the root of your application or create a folder with the name "patch". PS: I used Yarn, It was right away. |
Thank you guys it worked. @MichelDiz @padupuy . |
I ran into this as well and it's so frustrating that something so crucial as running apollo-client + react native android is not working when graphql returns an error response. /cc @peggyrayzis Luckily, @FabricioCabeca's solution worked out. Thanks a lot 🎉 Just to reiterate, here is what fixed it for me:
And hopefully, that should do it. Hope this helps. |
+1, took me hours to get at this error. My workaround: a simple polyfill: Object.setPrototypeOf = Object.setPrototypeOf || function (obj, proto) {
obj.__proto__ = proto
return obj
} |
@Tommos0, thanks! Your polyfill worked! |
Polyfill worked for me too. @Tommos0 thank you very much. |
Thank you guys. It was a pleasure to work with you.
…On Mon, May 14, 2018, 13:52 Hugh Willson ***@***.***> wrote:
PR #3306 <#3306> has
been merged (and will be included in the next apollo-client release).
Thanks for the additional troubleshooting details everyone, and thanks
@seklyza <https://github.com/seklyza> for working on a fix!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3236 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMYKLFtrdw9vQJhw8-1bURN_QInhtGBLks5tyWHrgaJpZM4TBt4c>
.
|
i am also getting the same error is there any solution |
Same issue, Here is my App.js
GraphQL query mutation:
handleSubmit:
Please help me Thank you |
@dafapramudya did you actually try the polyfill? I don't see it in your code? |
Folks, solutions have been proposed here. Please confirm you have tried the solution before you say you still see the problem. |
@ujwal-setlur how can i use polyfill? i'm sorry if I ask a lot, because I never use polyfill where i can put this code?
Thank you |
SOLVED thank you @Tommos0 @ujwal-setlur. Solved using polyfill |
I also experienced this same issue. I tried all the solutions above but none worked. I later discovered that apolloClient was pointing to the wrong url. When i fixed this, the error disappeared
|
I'm trying to do simple mutation and actually network request is happening and I'm receiving response. In case when response is error - code brakes immediately. Issue arrived only after update to 2.2.8. Downgrade to 2.2.7 helped and everything working as expected.
I'm using TypeScript compiler (latest one) and TSLib (latest one).
Version
apollo-client@2.2.8
blocking
The text was updated successfully, but these errors were encountered: