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

Unexpected token > in JSON at position 0 #14

Closed
icidasset opened this issue Oct 9, 2017 · 5 comments
Closed

Unexpected token > in JSON at position 0 #14

icidasset opened this issue Oct 9, 2017 · 5 comments

Comments

@icidasset
Copy link

Hi πŸ‘‹

First of all, thanks for this tool, good stuff!
Secondly, I wanted to ask you about this intermittent error that I'm having.
I can't seem to figure out where it is coming from.

Here's what I'm doing:

⚑ make test
> Run tests
Starting elm-doctest ...

 processing: src/App/Sources/Crypto/Hex.elm
Examples: 14  Failures: 0

 processing: src/App/Sources/Crypto/Hmac.elm
evaluation failed: Unexpected token > in JSON at position 0
Unexpected token > in JSON at position 0
make: *** [test] Error 1

~/Projects/ongaku-ryoho 12.67s master            
⚑ make test
> Run tests
Starting elm-doctest ...

 processing: src/App/Sources/Crypto/Hex.elm
Examples: 14  Failures: 0

 processing: src/App/Sources/Crypto/Hmac.elm
Examples: 2  Failures: 0

~/Projects/ongaku-ryoho 13.47s master  

So yeah, sometimes it fails and sometimes it doesn't.
Any ideas?

Thanks!

PS. You can find the source code here. I'm calling elm-doctest in the Makefile.

@tshm
Copy link
Owner

tshm commented Oct 11, 2017

Thank you for the report.
I will look into the issue by using your source code.

@tshm
Copy link
Owner

tshm commented Oct 12, 2017

@icidasset
Could you help me on checking one thing?
I suspect that there may be race condition between tests of two files. i.e. second run may have a chance to run earlier than the first one finishes. (it causes a problem, in current design, because they share a same temprary file.)
Please check to run the test one by one and see if the problem still persist or not.
i.e. running following separately.

elm-doctest src/App/Sources/Crypto/Hex.elm
elm-doctest src/App/Sources/Crypto/Hmac.elm

Thank you in advance for the help.

@icidasset
Copy link
Author

@tshm Sure thing. Yeah, it still happens occasionally when I run them separately. Occasionally in, I got the error on the 2nd time for the Hex.elm file and 5th time for the Hmac.elm file.

@icidasset
Copy link
Author

So, turns out this happens when you have a Debug.log statement in your code πŸ€¦β€β™‚οΈ

@tshm
Copy link
Owner

tshm commented Dec 22, 2017

Oh, I see.... Thank you for the report.
I'll look into it and try to fix it. If I cannot, I should at least document the limitation.

Thank you again.

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

2 participants