Illegal value for Message.Field .spotify.metadata.proto.Restriction.catalogue
hanxue opened this issue · 19 comments
After successfully logging in, I get this error in spotify.get()
. Full error message
Error: Illegal value for Message.Field .spotify.metadata.proto.Restriction.catalogue: 4 (not a valid enum value)
at ProtoBuf.Reflect.Field.verifyValue (/usr/local/lib/node_modules/spotify-web/node_modules/protobufjs/ProtoBuf.js:2321:27)
at Message.add (/usr/local/lib/node_modules/spotify-web/node_modules/protobufjs/ProtoBuf.js:1693:53)
at ProtoBuf.Reflect.Message.decode (/usr/local/lib/node_modules/spotify-web/node_modules/protobufjs/ProtoBuf.js:2137:29)
at ProtoBuf.Reflect.Field.decode (/usr/local/lib/node_modules/spotify-web/node_modules/protobufjs/ProtoBuf.js:2594:46)
at ProtoBuf.Reflect.Message.decode (/usr/local/lib/node_modules/spotify-web/node_modules/protobufjs/ProtoBuf.js:2137:51)
at Message.decode (/usr/local/lib/node_modules/spotify-web/node_modules/protobufjs/ProtoBuf.js:1982:41)
at Function.protobufjs_parse_wrapper [as parse] (/usr/local/lib/node_modules/spotify-web/lib/schemas.js:98:39)
at Spotify._parse (/usr/local/lib/node_modules/spotify-web/lib/spotify.js:1251:20)
Looks like we need to update the protobuf files. Seems like there's no data.xml file to copy them from anymore, they're inline as javascript.
Can you reproduce a track that gives this error consistently?
The example in README doesn't work for me. Although, I'm not sure what to do with that file you linked to.
Works on UNIX machines (protobuf).
Fails on Windows (protobufjs).
After you get protobuf working, it'll work like a charm. The pain however is node-gyp and protobuf! Good luck!
I commented in a hurry, so I'll elaborate a bit more.
It seems like Spotify has (yet again) changed their proto files and changed a field. protobuf
seems to be more forgiving than protobufjs
, which is the reason node-spotify-web
works on Unix, but not on Windows.
What we really need is a conveinient way of extracting the protocol information from the Spotify web app. If @adammw could give me a few pointers, I'd code some tools for that.
Experiencing the same with this track: 4aviW2muXVyNEFjaKZjg7Z. Thank you very much for any help!
@rubenwj AFAIK it's rather a general issue on Windows machines and not bound to specific tracks.
Sorry guys, I'm working at the moment so I haven't been paying my full attention to the goings on. The problem I was facing is that even though I extracted the schemas above from the spotify sdk file, it doesn't actually look like it contains any other enum values besides from the ones we already have in our .proto
files, so I wasn't entirely sure what was going on. That and I didn't realise that the problem only occurs when using the protobufjs parser as I usually develop/test on my Mac. Although I do see some references to catalogue string so perhaps it is now a string instead of an ENUM.
@silvinci for reference, you can grab the spotify sdk from the source code of play.spotify.com and look for the Spotify.Protobuf.Schemas object, it appears just to be a json hash that represents the protobuf format.
Seeing the same :(
Does anybody has a solution or workaround for this bug?
workaround: mauimauer/portify#95
For me this workaround didnt work. a new error appeared stating that the track is not playable in my country (which was not true).
however, i found that the x64 version of 0.10 branch of nodejs didnt throw the error at all. (all later versions failed for me as did all x86 versions)
http://nodejs.org/dist/v0.10.36/x64/
with this version i got spotify-web to run with old node-modules. with the newest ones the error reappeared so i stick with using the old ones.
hope this helps somebody...
nope didn't worked for me :(
didn't worked for me too :(
Same issue on osx.
I am also experiancing this issue. Both on windows and centos 6.
I have attempted the workaround above (on linux because i couldn't get the protobuf compiler thing to work), and had the same results noted above (track not available in my country).
Same issue here running on raspberry pi, raspbian wheezy. Nodejs version 4.3.2.