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

const: Assertion `m_ctx.size() == 1U' failed. #26

Closed
df1paw opened this issue Sep 4, 2015 · 5 comments
Closed

const: Assertion `m_ctx.size() == 1U' failed. #26

df1paw opened this issue Sep 4, 2015 · 5 comments

Comments

@df1paw
Copy link

df1paw commented Sep 4, 2015

Grive -a fails with the following error:

andreas@notebook:~/src/grive2/build/grive$ ./grive -a

Please go to this URL and get an authentication code:

Link removed

Please input the authentication code here:
code removed
grive: /home/andreas/src/grive2/libgrive/src/json/ValBuilder.cc:133: gr::Val gr::ValBuilder::Result() const: Assertion `m_ctx.size() == 1U' failed.
Abgebrochen (Speicherabzug geschrieben)

@vitalif
Copy link
Owner

vitalif commented Sep 26, 2015

Does it reproduce every time?

@efuquen
Copy link

efuquen commented Sep 29, 2015

I can confirm this is repeatedly happening for me, can't use grive2. Initially thought it might be related to me having 2 factor authentication enabled, but I disabled it and still got the same error:

grive: /home/efuquen/Code/oss/grive2/libgrive/src/json/ValBuilder.cc:133: gr::Val gr::ValBuilder::Result() const: Assertion `m_ctx.size() == 1U' failed.
Aborted (core dumped)

@vitalif
Copy link
Owner

vitalif commented Sep 30, 2015

I've just reimplemented HTTP response logging in grive, so please check grive -a --log-http http with the latest master version. httpXXX.txt file will be created with the full communication transcript.
In fact it seems I've also reproduced your issue by repeating auth request many times, and now Google always says to me:
{ "error" : "invalid_grant", "error_description" : "Code was already redeemed." }
Don't yet know how to fix it though O_o it repeats every time for me now.
Also, the "assertion failed" tells us that ValBuilder fails to parse this JSON response. This is also a bug and I'll fix it shortly...

@vitalif
Copy link
Owner

vitalif commented Sep 30, 2015

Oh, that's not ValBuilder, it's just OAuth2 not handling error responses. Fixed in master, now it will print "Failed to obtain auth token".

@vitalif
Copy link
Owner

vitalif commented Oct 7, 2015

The problem was that google for some occasion was giving me the same oauth2 code every time. Of course it was "already redeemed". So I believe the bug is fixed, please reopen it if you still have the problem.

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

3 participants