amnaredo / test

0 stars 0 forks source link

Older browser incompatibilities?? #134

Open amnaredo opened 3 years ago

amnaredo commented 3 years ago

I just want to confirm that these errors two I am getting are due to the browser version being too old for Scala.js.

[WARN] [07/14/2015 16:01:50.560] [qtp575216279-16] [Servlet30ConnectorServlet(akka://SMARTGAS)] Illegal HTTP header 'If-Modified-Since': Invalid input ';', expected OptWS or EOI (line 1, pos 30):
Wed, 03 Jun 2015 01:36:21 GMT; length=375299

This next one is actually a uPickle stack trace:

[ERROR] [07/14/2015 16:01:51.026] [SMARTGAS-akka.actor.default-dispatcher-4] [akka://SMARTGAS/user/MyAtmosphere] Error during processing of request HttpRequest(POST,http://www.seasoft.com.au/com/seasoft/atmosphere/AtmosphApi/anyUpdatesForMe,List(Host: www.seasoft.com.au, Content-Length: 0, X-Forwarded-Server: seasoft.com.au, X-Saucer: KhOPUjaZhBS2ugHjRXYFjzo=, User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0), Connection: keep-alive, X-Forwarded-Host: www.seasoft.com.au, Cache-Control: max-age=259200, Pragma: no-cache, Accept-Language: en-AU, Referer: http://www.seasoft.com.au/atmosphere/, Accept-Encoding: gzip, deflate, X-Forwarded-For: 10.152.3.58, 139.130.159.14, 117.120.16.132, X-Teacup: eFDRD1/J2E754Rc=, DNT: 1, Via: 1.1 ClientSiteProxy:3128 (squid/2.7.STABLE4), 1.0 proxy-4_11 (squid), Content-Type: text/plain; charset=UTF-8),Empty,HTTP/1.1)
upickle.Invalid$Json: JsonParse Error: jawn.IncompleteParseException: exhausted input in
    at upickle.json.package$.read(package.scala:11)
    at upickle.Types$class.read(Types.scala:135)
    at upickle.package$.read(package.scala:10)
    at simple.AtmosphereService$$anonfun$14$$anonfun$apply$12$$anonfun$apply$13.apply(AtmosphereService.scala:318)

Please tell me if this is the wrong place to report this. I imagine there is no way around these kinds of problems.

ID: 99 Original Author: chrismurrph

amnaredo commented 3 years ago

The first one doesn't look like it has anything to do with either Scala.js or upickle per se -- that appears to be a pure HTTP problem, between your browser and your server. Might have something to do with a library you're using in Scala.js, but I'd be surprised if the problem was at the Scala level at all.

The second I'm less sure about, but again it looks like the heart of the problem is from the outside -- I would guess that somewhere between Atmosphere and upickle the content is getting truncated. I'd recommend a println to show the string that you're feeding to upickle, to see whether it appears to be complete -- I would bet it isn't. (Are you trying to do something websocket-based? Is it possible that you're trying to unpickle a partial message?)

Original Author: jducoeur

amnaredo commented 3 years ago

Thanks. Spray-router is used at the back-end running on Jetty. So I guess the advice here would be to get the most recent version of Spray and see if the problem disappears. Otherwise talk to the Spray people. It came a few lines before the actual uPickle error hence I included it here.

I'm not doing anything websocket-based AFAIK. The communication is 'standard' Autowire, uPickle and Ajax. The signature for that particular call is:

    def anyUpdatesForMe(uniqueClientNumber: Int, force: Boolean): Seq[Response]  

, and for Response is:

    sealed class Cmd(value: Any)
    case class Response(value: String) extends Cmd(value)

The Client (i.e. Browser) is continually asking if there are any updates for it. Each String is a command that the Client understands and acts on. It works normally. The problem seems to be browser dependent: http://www.seasoft.com.au/atmosphere/

Original Author: chrismurrph

amnaredo commented 3 years ago

I don't know anything about autowire, ajax, websockets, jetty, spray, or anything like that.

Give me a repro with upickle only, and I'll take a look =)

If you need help narrowing down, feel free to ask for help on https://gitter.im/scala-js/scala-js

Original Author: lihaoyi