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

5.3.0 - Invalid JSON string w/ Spotify #87

Closed
NHDriver4 opened this issue Feb 23, 2016 · 25 comments
Closed

5.3.0 - Invalid JSON string w/ Spotify #87

NHDriver4 opened this issue Feb 23, 2016 · 25 comments
Assignees
Labels

Comments

@NHDriver4
Copy link

Hello. Spotify updated and ever since then I'm getting this error message.

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.Serialization.SerializationException: Invalid JSON string
   at SimpleJson.SimpleJson.DeserializeObject(String json)
   at Winter.Spotify.Update()
   at Winter.Snip.TimerScanMediaPlayer_Tick(Object sender, EventArgs e)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.127.1 built by: NETFXREL3STAGE
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Snip
    Assembly Version: 5.1.0.0
    Win32 Version: 5.1.0.0
    CodeBase: file:///D:/Stream_Stuff/Snip/Snip.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.79.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.79.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1068.2 built by: NETFXREL3STAGE
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.79.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.79.0 built by: NETFXREL2
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.1064.2 built by: NETFXREL3STAGE
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.CSharp
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.79.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
----------------------------------------
System.Web
    Assembly Version: 4.0.0.0
    Win32 Version: 4.6.114.0 built by: NETFXREL3STAGE
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
@NHDriver4
Copy link
Author

Just a quick note too.. If I close spotify and run Snip, it loads just fine. The moment I play a track, it crashes again with the same error.

@dlrudie
Copy link
Owner

dlrudie commented Feb 23, 2016

Can you post your Spotify version? Mine has not asked me to update to any newer version and it's still working for me.

@NHDriver4
Copy link
Author

capture

@HalcyonFury
Copy link

Just chiming in that I'm having the exact same issue, same version of Spotify

@dlrudie
Copy link
Owner

dlrudie commented Feb 27, 2016

Try this file and screenshot any error boxes that pop up.

Snip-v5.3.0-test.zip

@dlrudie dlrudie added the bug label Feb 27, 2016
@dlrudie dlrudie self-assigned this Feb 27, 2016
@dlrudie
Copy link
Owner

dlrudie commented Feb 27, 2016

I have not been able to duplicate this issue.

@NHDriver4
Copy link
Author

Is there anything that we can do to assist in determining the cause?
On Feb 27, 2016 3:05 PM, "David Rudie" notifications@github.com wrote:

I have not been able to duplicate this issue.


Reply to this email directly or view it on GitHub
#87 (comment).

@NHDriver4
Copy link
Author

Sorry, didn't see that.I'll try it tomorrow when I'm home. Thanks again!

@HalcyonFury
Copy link

Using the file you linked, I'm able to use it with Spotify on stream flawlessly.

@dlrudie
Copy link
Owner

dlrudie commented Feb 27, 2016

That's weird. I literally changed nothing other than added one try-catch exception to display a messagebox instead of crashing.

@Kenpachi10
Copy link

I am still getting this error as well, with the one try-catch exception added, I receive a ton of messages boxes that are near endless until I quit snip.

@dlrudie
Copy link
Owner

dlrudie commented Feb 28, 2016

You probably will. What do they look like?

@Kenpachi10
Copy link

snipissue

@dlrudie
Copy link
Owner

dlrudie commented Feb 28, 2016

It looks like you can't access Spotify's web server.

I can't either right now. They might be doing some maintenance or something.

@Kenpachi10
Copy link

Fair enough. Will keep you updated if it continues past the next few hours. You need a packet trace or anything?

EDIT: If it does continue, I mean do you need a packet trace.

@dlrudie
Copy link
Owner

dlrudie commented Feb 29, 2016

For the record, the 503 Server Unavailable error is different than the original issue. The original issue is about invalid JSON, not server unavailability. If you can re-test to see if you can duplicate the issue that would be great.

In the meantime I think I'll use this issue to implement better error catching and fall-backs.

@NHDriver4
Copy link
Author

@dlrudie Sorry for the delay in testing. Your test files work just fine. I confirmed the current release is still giving me the same error.

@dlrudie
Copy link
Owner

dlrudie commented Mar 31, 2016

I still have no answer for this.

@Giulio1708
Copy link

I solved the issue with the version you provided just above, but my antivirus (BitDefender) says that it's a virus.
That's not a big deal, I added the app in exceptions, but it for someone it can be a problem.
The current release, instead, gives me the Invalid JSON error.

@Kenpachi10
Copy link

I'm still experiencing this issue, however its extremely intermittent.

@jan422
Copy link

jan422 commented Jun 23, 2016

I have too this problem and link dlrudie send I no can open this snip in my PC

@Blizzardo1
Copy link

Looks like when it tries to parse the JSON, it doesn't know how to handle null or empty data. It looks like it was coming from Spotify.cs at Line 76, There's not a check to see if the download is null or empty, thus causing that error. I'm testing your source in one of my development projects, and that particular line got brought to my attention. I hope this helps you.

@dlrudie
Copy link
Owner

dlrudie commented Aug 19, 2016

There are definitely some bugs in regards to this. Most noticeably is when Spotify's site simply does not provide the JSON to you. I've ran into this randomly where I'll request the JSON from their site and it will simply reply with a blank result. When I submit it a second time exactly the same way it returns successfully. While I have never seen this issue with my own use of Snip... I can see where it could potentially happen to some users if, for example, Spotify throttles responses to users within a broad IP range.

Snip could definitely use better error handling and I do intend to implement just that in the future.

@FluxMonkii
Copy link

Hello, thought i'd leave a comment regarding this issue..

This exception is still occurring in Snip v5.5.0 with Spotify version 1.0.38.171.g5e1cd7b2
I've come across exactly one song in all my playlists which causes the exception every time it plays, which i hope will aid you in finding a resolution;

https://open.spotify.com/track/3vZO25GdYuqFrR1kzZADnp
spotify:artist:2WKdxPFRD7IqZvlIAvhMgY

It occurs whether i rapidly skip through playlists or not, so it's not a rate-limit issue or the like from Spotify.

Cheers for Snip!

@dlrudie
Copy link
Owner

dlrudie commented Sep 24, 2016

Great! As soon as I get off of work today I'll take a look at it. Thank you.

dlrudie pushed a commit that referenced this issue Sep 25, 2016
While researching #87 I found that Snip would repeatedly spam Spotify's
server until it got a result. This allows only one query to occur at a
time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants