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

Parser error when connected to Spigot server #1

Closed
Darker opened this issue Jul 12, 2015 · 3 comments
Closed

Parser error when connected to Spigot server #1

Darker opened this issue Jul 12, 2015 · 3 comments

Comments

@Darker
Copy link

Darker commented Jul 12, 2015

This popped up adn crashed my bot:

C:\Users\Jakub\node_modules\node-mojangson\grammar.js:148
        throw new Error(str);
              ^
Error: Parse error on line 1:
...st:31,display:{Name:"/\ Swacker Broad he
-----------------------^
Expecting 'EOF', 'RIGHTC', 'DP', 'COMMA', 'RIGHTP', got 'STRINGWITHOUTQUOTE'
    at Object.parseError (C:\Users\Jakub\node_modules\node-mojangson\grammar.js:148:15)
    at Object.parse (C:\Users\Jakub\node_modules\node-mojangson\grammar.js:213:22)
    at Object.module.exports.parse (C:\Users\Jakub\node_modules\node-mojangson\index.js:3:52)
    at ChatMessage.parse (C:\Users\Jakub\node_modules\mineflayer\lib\chat_message.js:134:41)
    at new ChatMessage (C:\Users\Jakub\node_modules\mineflayer\lib\chat_message.js:17:8)
    at C:\Users\Jakub\node_modules\mineflayer\lib\chat_message.js:44:32
    at Array.forEach (native)
    at ChatMessage.parse (C:\Users\Jakub\node_modules\mineflayer\lib\chat_message.js:39:17)
    at new ChatMessage (C:\Users\Jakub\node_modules\mineflayer\lib\chat_message.js:17:8)
    at parseJsonMessage7 (C:\Users\Jakub\node_modules\mineflayer\lib\plugins\chat.js:74:25)

I suppose that either you're something missing or the server is sending invalid data. If the former is true it remains mystery why normal clients do not have any problems. The error was probably caused by a death message which contained weapon info.

I cannot reproduce this since it wasn't my server.

@rom1504
Copy link
Member

rom1504 commented Jul 12, 2015

I guess that should display a more complete error message with the complete
input, I'll change that.
That error message is too little information to know whether it's invalid
data or a problem in the parser.

On Sun, Jul 12, 2015, 14:24 Jakub Mareda notifications@github.com wrote:

This popped up adn crashed my bot:

C:\Users\Jakub\node_modules\node-mojangson\grammar.js:148
throw new Error(str);
^
Error: Parse error on line 1:
...st:31,display:{Name:"/\ Swacker Broad he
-----------------------^
Expecting 'EOF', 'RIGHTC', 'DP', 'COMMA', 'RIGHTP', got 'STRINGWITHOUTQUOTE'
at Object.parseError (C:\Users\Jakub\node_modules\node-mojangson\grammar.js:148:15)
at Object.parse (C:\Users\Jakub\node_modules\node-mojangson\grammar.js:213:22)
at Object.module.exports.parse (C:\Users\Jakub\node_modules\node-mojangson\index.js:3:52)
at ChatMessage.parse (C:\Users\Jakub\node_modules\mineflayer\lib\chat_message.js:134:41)
at new ChatMessage (C:\Users\Jakub\node_modules\mineflayer\lib\chat_message.js:17:8)
at C:\Users\Jakub\node_modules\mineflayer\lib\chat_message.js:44:32
at Array.forEach (native)
at ChatMessage.parse (C:\Users\Jakub\node_modules\mineflayer\lib\chat_message.js:39:17)
at new ChatMessage (C:\Users\Jakub\node_modules\mineflayer\lib\chat_message.js:17:8)
at parseJsonMessage7 (C:\Users\Jakub\node_modules\mineflayer\lib\plugins\chat.js:74:25)

I suppose that either you're something missing or the server is sending
invalid data. If the former is true it remains mystery why normal clients
do not have any problems. The error was probably caused by a death message
which contained weapon info.

I cannot reproduce this since it wasn't my server.


Reply to this email directly or view it on GitHub
#1.

@Darker
Copy link
Author

Darker commented Jul 13, 2015

I know that. Take it just for first indication of possible bug. If it's real, some reports will possibly follow.

The only thing I know this is related to death message containing info about named item that's likely to be colored. But it doesn't happen normally for colored item death messages.

@rom1504
Copy link
Member

rom1504 commented Jul 27, 2015

Fixed by 86f73fe
That commit displays more info when an error happen.

@rom1504 rom1504 closed this as completed Jul 27, 2015
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