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

A wierd situation on chrome when dart_amf used #1

Open
ghost opened this issue Sep 1, 2016 · 6 comments
Open

A wierd situation on chrome when dart_amf used #1

ghost opened this issue Sep 1, 2016 · 6 comments

Comments

@ghost
Copy link

ghost commented Sep 1, 2016

Hi, blanchg
I use the latest dart_amf in my webapp, and everything goes perect to call remote function and get remote object in Chromium 45. However, when l deploy the webapp on to server with jboss, and use the chrome 50 to run, dart_amf will return 'unregistered class xxxxxxx occurued' after remote function call. I do not understand what's difference beteewn the two browsers. Could you provide me with some directions?

@ghost
Copy link
Author

ghost commented Sep 1, 2016

I fogot to comment that objects in server side were registerd with @Remote object in the client side

@blanchg
Copy link
Owner

blanchg commented Sep 1, 2016

Does your deployed version on jboss work with Chromium 45 as well?

@ghost
Copy link
Author

ghost commented Sep 1, 2016

Yes, deployed version is workable with chromium45, but are fail on chrome50.
I tried to print out what I got after remote call, the instance(object) list was recieved by chromium, and the json objecct list was recieved. So interesting.

@blanchg
Copy link
Owner

blanchg commented Sep 1, 2016

You will likely need to debug the names coming back and the names being registered when you use @RemoteClass

lib/src/amf_io.dart function readScriptObject

This function is where it decodes the incoming objects maybe uncomment the print statements and see what you can discover from that. Hopefully it is just a simple change to get it working for both.

@ghost
Copy link
Author

ghost commented Sep 2, 2016

Thanks for your suggestions. Something different were found when webapp executed on two browsers. Chromium would load the native dart script to execute, and chrome load the js code compiled by dart2js. The difference was observed by the dev tool. Furthermore, adopted your suggestios, l found maps for registered objects in amf_io will not keep my @RemoteObject, and only keep flex related class. So, I force to call registerClass to register my class in main, but when l used print to list all map, my clazz become meaningless alphabets, like {“com. mycompany.ws”, rj}, “rj” is the remote object “MyController”.

@blanchg
Copy link
Owner

blanchg commented Sep 4, 2016

What is the name of the class it is looking for compared to the name you registered.

e.g. compare the output of https://github.com/blanchg/dart_amf/blob/master/lib/src/amf_io.dart#L621 with your code Amf.registerClass("server.package.Animal", Animal);

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

1 participant