Open leighmcculloch opened 2 years ago
I have similar issue. I have built dart web app, deployed it to firebase hosting but it don't works at safari. It fails with 404 when main.dart.bootstrap.js
is loaded. Here is request summary from safari console:
URL: https://host.com/@https://host.com/main.dart.bootstrap.js
URL: https://host.com/@https:/host.com/main.dart.bootstrap.js
Status: 404
Source: Network
Initiator:
require.js:1959
For some reasons there is "@" prefix before url in data-main
attribute for script tag to import main.dart.bootstrap.
Interesting that in chrome this import looks different:
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="main.dart.bootstrap" src="https://dashboard.qvin.com/main.dart.bootstrap.js"></script>
I think reason was development JavaScript compiler. I changed build script to webdev build
and it started to work fine.
Any progress on this issue? It's quite difficult to work on OSX and test locally with safari right now
I found the reason for "@" prefix in Safari - build_web_compilers/lib/src/dev_compiler_bootstrap.dart
, function _currentDirectoryScript
. Changing return statement for Safari to:
return lines[0].match(/(.+):\d+:\d+$/)[1].substring(1);
solves the problem, but it's more of a quick fix.
dart --version
):Dart SDK version: 2.14.4 (stable) (Wed Oct 13 11:11:32 2021 +0200) on "macos_x64"
MacOSX
Safari
Creating a new dart application using the
web-simple
template using the dart cli, results in an application that 500s with errors. It seems like the template has been broken in some way.Visiting https://127.0.0.1:8080 displays a blank page with console errors:
The server displays the following errors in the logs: