polymer-dart / todo_ddc

15 stars 3 forks source link

Mobile Safari (iOS) and Microsoft Edge Support #12

Open saschagrunert opened 7 years ago

saschagrunert commented 7 years ago

We are not able to serve the example for Mobile Safari and Windows (Edge/IE) browsers. Can you confirm this and how can this be fixed?

Drogglbecher commented 7 years ago

Yeah, I can confirm this. Edge reports the following:

[WARNING] SEC7112: Script from <...>/main.dart was blocked due to mime type mismatch
[ERROR] SCRIPT5007: Unable to get property 'apply' of undefined or null reference.
....

and so on.

dam0vm3nt commented 7 years ago

k tnx. I'll take a look.

saschagrunert commented 7 years ago

I am not sure if this is related to webcomponentsjs or dart. The mentioned browsers complain about not being able to load index.dart, which indeed does not exist but the transpiled JavaScript.

dam0vm3nt commented 7 years ago

tested with Edge and now it works. need testing for Safari.

I've also noticed that Edge will complain about a lot of missing files if the "dev tools" (how dare they call that crap a dev tool ?) are opened, some of which are .dart files that makes no sense.

I suspect it's only a matter with the sourcemaps infact my test is working (with "dev tools" closed).

Let me know how it goes for you.

saschagrunert commented 7 years ago

Alright, thanks for the fix. I just tested it under Safari 10.1.2, the page loads but it complains about some missing javascript maps:

img

dam0vm3nt commented 7 years ago

I notice some timeout too. That can be caused by dartdevc being to slow. Try reloading the page and see if it's better. For the sourcemaps, if you're using pub serve that can be an issue with dartdevc. Otherwise try using pub serve.

saschagrunert commented 7 years ago

@dam0vm3nt yes I used pub serve to load the page. I guess the timeout occurs because my MacBook Pro is a bit slow, correct.

It still does not work via iOS, but I am currently not able to see the debug console output from the mobile page. :/

Drogglbecher commented 7 years ago

Thanks for your work. I tested it with Edge 40.15063 in a Win10 VM an unfortunately for me occur the same errors as before. I did a countertest in Chrome on the VM and it works fine as expected. I deleted .pub, .package and build dir, pulled your changes and did pub get, pub build and pub serveagain. Maybe you have some additional ideas?

dam0vm3nt commented 7 years ago

@Drogglbecher that's strange. The same test I've made and it works. I'll check edge version. Please can you try cleaning edge cache and without Dev tools open?

dam0vm3nt commented 7 years ago

@saschagrunert I think you can connect macpro safari dev tool to the iPhone browser and check with that.

dam0vm3nt commented 7 years ago

@Drogglbecher This is what I've done :

  1. run pub serve on the linux host
  2. open the page with edge on the win10pro vm - nothing work
  3. open the page with chrome on the win10pro vm - page shown
  4. refresh the page on edge : now it work (after wating almost 30sec)

This is the result: selezione_340

In my previous test I've made a pub build and then served build/web through polymer serve and it worked without having to open on chrome first.

The only differences between the two method are :

Can you confirm that any of the above methods (opening first with chrome and refreshing, or serving a build without pub serve) is working ?