Comments (4)
In this case, I'm assuming you are parsing JSON that comes out of the websocket layer, in the on-message
callback?
If so, it sounds like either the JSON being sent is bad or that maybe the websocket layer is dropping some bytes. Do you have a reproducible example?
from emacs-websocket.
No reproducible example unfortunately, I haven’t yet picked up on what the pattern is. Last I noticed this was when I was working on some .asciidoc files.
from emacs-websocket.
I'm getting a similar error when using websocket.el with atomic-chrome.el (to use Emacs to edit text from a text edit box in Chrome).
Error (websocket): in callback `on-message': Bad string format: "?\\C-@" Error (websocket): in callback `on-message': JSON readtable error: 101
It happens when trying to edit Wikipedia articles like https://en.wikipedia.org/w/index.php?title=Kmart&action=edit using the source editor (not the visual editor, of course).
I'm able to edit .js and .css files on Wikipedia without errors. It seems like it may be specific to the wikitext format.
from emacs-websocket.
I'm guessing this is an error with the websocket client - note that it is an issue in the callback, and with JSON, which websocket doesn't deal with. Perhaps we're doing some wrong encoding, which maybe is possible.
I haven't used atomic-chrome, but I tried it out and it seemed to not work for a different reason: it is assuming a frame is complete. In the exact article you point to, when I send it, the first frame isn't complete and completep
is set to non-nil. So when it comes time to parse it in atomic-chrome-on-message
, it cannot be parsed to JSON because it isn't a completely JSON object yet. The solution is for atomic-chrome-on-message
to handle incomplete frames (or perhaps for our websocket library to optionally combine frames).
I'll create a bug with them alerting them of this fact. The bug you reported may be a different bug, though.
from emacs-websocket.
Related Issues (20)
- websocket-frame-text error HOT 1
- Add release tags HOT 3
- Custom headers in handshake HOT 4
- How to handle an error occured in `websocket-outer-filter`? HOT 6
- A single message ws.send(data); comes in as two messages HOT 5
- Speed feedback HOT 10
- Randomly losing connections under emacs-ipython-notebook with version 1.11 HOT 5
- Setting case-fold-search to nil results "Incorrect handhake from websocket" error HOT 7
- declares GPL-3+, but provided full-text license is GPL-2+ HOT 3
- Please tag a 1.12 release HOT 1
- Please consider adapting websocket-functional-test.el to use ert-deftest HOT 12
- TLSv1.3 HOT 1
- Branch rename breaks package installation HOT 6
- websocket-test.el: ‘flet’ is an obsolete macro (as of [emacs] 24.3) HOT 3
- websocket-to-bytes signal type error HOT 8
- Support connecting through proxies HOT 7
- infinite failure loop - emacs locked up HOT 18
- error 403 with ein over proxy HOT 14
- Push to ELPA? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-websocket.