-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Client with :ajax fails with Assert failed: (string? prefixed-pstr) #95
Comments
Hi Martin, Could you please try the Sente reference example over Ajax (it randomly selects |
The reference example work just fine. For both :ws and :ajax I saw clients popping up. |
Can you try run |
Still the same.
I see no |
That's a good catch. Are you using Ring's |
That was it! I was missing both wrappers and they have to be in that specific order of application, first I saw that warning when I was trying with sente '1.3.0-RC2' but it was missing with "1.2.0" and I got feeling that it is because of some new functionality. Thanks for helping! |
No problem, happy you've got it working :-) |
Just FYI, this caught me out too when Ring's |
@seancorfield Hey Sean, what version did you have the trouble with? v1.3+ issues a warning when the necessary middleware is missing. |
The warning's easy to miss tho' - as shown above. It was a while back but I think what happened was that I updated Ring, found |
This is true ;-) Will make the change tomorrow. Appreciate the input! |
Hi,
I have client that wants to communicate with backend over Ajax. I first configured the client part with
:type :auto
and on my local machine it ended up to be always:ws
but then I realized that the target Apache is 2.2 which is missing WebSockets support, so I changed to:type :ajax
. Until that, all client/server communication was just fine, but with:ajax
I immediately started to receive bellow exception. Note that there is still no Apache. It is just lein run, starting http-kit.I thought it is complaining about non-prefixed message id, but I am sending this
[:app/login {:username "" :password ""}]
.On server side, I use Stuart Sierra's
component
library and I enrich each request coming in with some references to components. The wrapper function is bellow. In fact,ws
is map containingajax-post-fn
function that is called on the request later inPOST /ws
route.I tried to read body from the failing POST request, and it has following form:
I am using sente "1.2.0" and http-kit "2.1.19". Tried also sente "1.3.0RC2", same result.
The text was updated successfully, but these errors were encountered: