Strangely, I am unable to deploy flutter apps via Flutter web since some days.
I have not problem running and debugging the Flutter app in a chrome browser via Android studio but once I try
flutter build web
the generated index.html file unter /build/web/ will show a blank page with these errrors:
Chrome error messages image
I started a completely new project so the error will not be due to my bad code writing :P
Can somebody help?
just change to <base href="./"> in index.html after you build the web.
Try remove .dart-tool folder in your project folder and rebuild your projcet.
I had the same error and changing index.html not worked. I solved it by removing .dart-tool folder in your project folder. After removing it, IDE shows some errors but flutter build web works fine.
Here is the origin link. https://github.com/flutter/flutter/issues/61464#issuecomment-924577391
just Clear browsing data in privacy and security
if not see any error in the console
This is an old question, but it seems to perpetuate (I also crashed into it). So here is what helped me to solve the problem:
The doc says:
Update the <base href="/"> tag in web/index.html to the path where your app is hosted.
In my case, it was htdocs/app, so base href become <base href="/app">, which fix the problem for me.
Related
I recently made a flutter application and now I want to get a web release, but when I run flutter build web and upload stored files in {root}/build/web on the host, everything is showing on chrome and firefox with that URL is an empty page with 2 console errors:
_flutter is not defined
GET https://web.pushers.ir/flutter.js 404
I took a look at my released files and didn't see any file named flutter.js, I tried flutter build web many times but nothing, also I tried to create another flutter project as a sample and ran flutter web build, on that sample everything was ok and flutter.js created with other released files
What should I do?
notice: it's working with Microsoft Edge, even while there is no file named flutter.js
Had the same issue.
Long story short: run flutter clean instead of manually deleting the /build/web folder or its content. The next build that follows will properly generate all files, including flutter.js.
More info why that is happening
I just copied flutter.js from a sample project release into my app release and it works
i have been reading more than 10 similiar question for this error and still cant solve my problem
im trying delete .idea and still cant solve it,trying add content root in my project too, but the problem isn`t solved, can you help me?, thanks
Apart from the warning 'Entrypoint is not a dart file' my main.dart was also showing the code in just one plain color (white) with no intellisense whatsoever.
After deleting .ideal/ folder and dart_tools, uninstalling/re-instaling android studio, and other attempts, there was no luck and no solution on google addressing this very error message so i decided to try this:
After saving my work
Go To File in Android Studio Menu at the top
Manage IDE Settings
Restore Default Settings
It will redownload android sdk and setup everything as new.
Paste your codes from previous projects and ride on!
Update: While a root cause has not been determined for these errors. I have been able to fix my issues via reimporting and reinstalling the Google AdMob Manual SDK all together.
New to this whole Stackoverflow, not sure if I should make that as the answer?
I'm attempting to install the Google AdMob module into my SwiftUI iOS application using the Manual SDK method located on their documentation page. The project throws no errors until I build the project, at that time it tells me "Build Succeeded" then tells me the below error. When I navigate to the path, I can get to the following directory however, there is no further file there...
/Users/PROFILE/Library/Developer/CoreSimulator/Devices/DEVICE_UUID/data/Library/Caches/com.apple.mobile.installd.staging
I have ensure that the Info.plist is in the directory. I have also verified that the path is proper via the Build Settings.
Please try again later.
Failed to load Info.plist from bundle at path /Users/PROFILE/Library/Developer/CoreSimulator/Devices/DEVICE_UUID/data/Library/Caches/com.apple.mobile.installd.staging/temp.z14Qmt/extracted/HealthCalc.app/Frameworks/GoogleMobileAds.framework;
Extra info about "/Users/PROFILE/Library/Developer/CoreSimulator/Devices/DEVICE_UUID/data/Library/Caches/com.apple.mobile.installd.staging/temp.z14Qmt/extracted/HealthCalc.app/Frameworks/GoogleMobileAds.framework/Info.plist":
Couldn't stat /Users/PROFILE/Library/Developer/CoreSimulator/Devices/DEVICE_UUID/data/Library/Caches/com.apple.mobile.installd.staging/temp.z14Qmt/extracted/HealthCalc.app/Frameworks/GoogleMobileAds.framework/Info.plist: No such file or directory
While a root cause has not been determined for these errors. I have been able to fix my issues via reimporting and reinstalling the Google AdMob Manual SDK all together.
In doing so I followed the Manual SDK Instructions, particularly I believe the root issue was some funky indentation or mishap in the Info.plist. That being said, if you run into a similar issue, I urge you to take a step back. Start a fresh blank project and attempt to implement the Google AdMob procedures in the blank project. This will eliminate the concern that your current code is causing any conflicts. Once completed and you have it working, mimic the steps within your core project.
I created new default tab project . I changed nothing. run the ionic serve no errors app opened in beowser its empty nothing.
After long investgation i found it opens the index.html inside src.
what happend why it is not lunching the real app.
I have ionic 5
It was a chrom problem. I had old version I upgrade it works fine. Looks old chrom dont understand type="model" for that it was nit downloading the js file
I got the following errors after ionic serve --lab:
Any Idea why the error above is occurred?
Ionic cli version 3.9.0
App scripts version 1.4.1
Typescript 2.3.9
Thanks.
Stylesheets don't get applied and javascript is not executed, because your browser reports wrong MIME types for these requested documents. They're all sent as text/html.
It seems to be the same problem, as reported here.
You may try to go to any of the .ts files like user.ts or app.ts and save them again. This will trigger the automatic build, once finished, your app should run fine again.
After some investigations I found very similar problems.
Could you try the following:
Add <base href="/"> in head before linking all css files
https://github.com/froala/angular-froala/issues/170#issuecomment-386117678
https://github.com/angular/angular-cli/issues/10325#issuecomment-399329033
I faced the same issue many times.when i close the console and run it again as ionic serve it worked for me properly.Try this once.