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

Error reporting bugged #12

Closed
gjaldon opened this issue Dec 13, 2017 · 11 comments
Closed

Error reporting bugged #12

gjaldon opened this issue Dec 13, 2017 · 11 comments

Comments

@gjaldon
Copy link

gjaldon commented Dec 13, 2017

I'm using apollo on the frontend and absinthe on the backend. I experienced an issue where I was submitting a mutation to the backend but it would not go through. I'd get a totally different unrelated error like:
error

Turns out the actual error in the backend was that the input was incorrect (a required argument was not provided). This error was not reported because I was getting Uncaught TypeError: Cannot read property '_observer' of undefined instead. That undefined error is the one being reported because subscription is undefined in the below code:

   // zen-observable v0.6.0 lines 158-162.
   var subscription = this._subscription;

    // If the stream is closed, throw the error to the caller
    if (subscriptionClosed(subscription))
      throw value;

This happens before the actual error value is thrown.

We do not use zen-observable directly in our project and is only a dependency of socket-apollo-link.

@mtarnovan
Copy link

I'm seeing the same error, but in my case the subscription query is correct and there's no error on the backend.

@mgtitimoli
Copy link
Member

mgtitimoli commented Feb 20, 2018

This issue will be fixed on the next release that will be released on March, meanwhile I will paste below a stacktrace taken from this error on a release with sourcemaps:

undefined is not an object (evaluating 'subscription._observer')

subscriptionClosed
   zen-observable.js:66:22
error
   zen-observable.js:161:27
<unknown>
   notify.js:6:49
notify
   notify.js:11:29
abortRequest
   pushRequest.js:39:17
onError
   pushRequest.js:43:15
<unknown>
   createPushHandler.js:15:4
matchReceive
   phoenix.js:321:17
<unknown>
   phoenix.js:354:27
trigger
   phoenix.js:614:13
<unknown>
   phoenix.js:436:21
trigger
   phoenix.js:614:13
<unknown>
   phoenix.js:1037:19
onConnMessage
   phoenix.js:1023:18
dispatchEvent
   event-target.js:172:43
<unknown>
   WebSocket.js:237:27
emit
   EventEmitter.js:182:12
__callFunction
   MessageQueue.js:353:47
<unknown>
   MessageQueue.js:118:26
__guardSafe
   MessageQueue.js:316:6
callFunctionReturnFlushedQueue
   MessageQueue.js:117:17

@JesusPuga
Copy link

I have a similar problem
has this issue some advance o some temporal solution?

@southerneer
Copy link

Any word on that March release?

@mgtitimoli
Copy link
Member

Hi everyone,

The new version should be released soon, unfortunately the past 2 months I haven't had enough time to move forward with it as we are in the last phase of the product for the company I work for and support my time on absinthe.

I will be able to proceed with the release once we ship the product, and this should be in the next month or so.

My apologies to everyone.

@nathanqueija
Copy link

nathanqueija commented May 17, 2018

Does this error prevent apollo's subscriptions from working?
I'm not receiving any responses from subscription.
@mgtitimoli, any word on that new version release?
Thanks!

@MikaAK
Copy link

MikaAK commented Jun 26, 2018

What can I do to fix this? Happy to make a PR

@markkanof
Copy link

Any updates on this? I'm running into this issue, that seems to be triggered when called resetStore on my Apollo client.

mpoeter added a commit to Lean5/absinthe-socket that referenced this issue Aug 14, 2018
@rjacobskind
Copy link

@mgtitimoli Is there any update on this? I'm seeing this error frequently as well

rjacobskind added a commit to rjacobskind/absinthe-socket that referenced this issue Oct 10, 2018
@rjacobskind
Copy link

rjacobskind commented Oct 10, 2018

I opened PR #26 to solve this and issue #15 .
Thank you to mpoeter for contributing

@rmoorman
Copy link

rmoorman commented Nov 16, 2018

I can confirm that the patch in PR #26 does fix the issue over here! Thank you @mpoeter and @rjacobskind for this!

The problem in my case was, that the I had a missing subscription field and this "error" mentioned here shadowed the real issue obviously. After fixing this, #29 (might be fixed by #20) could go a long way to have some more helpful error messages.

I hope some fix for these problem will be released soon as a proper error reporting (in order to know what actually went wrong easily) seems vital for this project.

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

10 participants