I have created an app using Flutter v3, and I am using GoRouter to handle all the routes. When I run the app on localhost, everything is working fine. But when I try to go to /signIn page after uploading it to Netlify, it shows a "Page Not Found" error.
URL: https://63406985ec088a30cd8c9de8--allmity-beta.netlify.app/
When you open the above URL, you will automatically be redirected to https://63406985ec088a30cd8c9de8--allmity-beta.netlify.app/signIn.
But when you go to https://63406985ec088a30cd8c9de8--allmity-beta.netlify.app/signIn directly, it will show the error.
I was able to fix the error by adding a 200 redirect rule in netlify.toml file to redirect all requests to /.
Here are a few helpful resources:
https://answers.netlify.com/t/support-guide-direct-links-to-my-single-page-app-spa-dont-work/126
https://www.netlify.com/blog/2019/01/16/redirect-rules-for-all-how-to-configure-redirects-for-your-static-site/
Related
ScreenShot
When I open the link in the email that is sent by Firebase Auth it self, I'm getting 404 Page Not Found screen. However, I have different web apps as well, and I don't have this problem with them. Only difference between this project and others is this project in Production mode.
Note: Site is working as expected, except email links (I'm not facing this 404 page if I just open my web site).
I run flutter doctor -v and there is no problem.
I have tried flutter clean but no result.
I have updated firebase packages but no result.
In my flutter web, I use route-generating to navigate around the debug running side (localHost), from home to profile, and so on.
However, when I publish the website to the internet, the routing appears to be missing.
I open the website normally; everything is fine until I refresh the page, at which point BOOM! The page crashes and returns a 404 error: not found.
I tried multiple solutions, such as adding a 404.html file to my web Folder, and i tried to add .htaccess like the solution in this problem here .
https://stackoverflow.com/a/72147109/14865120
So what is there any other solution to Fix this problem??
I am launching external url on a button click by using window.location.replace
Login(){
window.location.replace("https://localdomain.com");
}
In ionic serve, after the click it redirects to "https://localdomain.com/uaa/login" and letting me to Login with corresponding cookies & header info coming as expected.
But if the same is tried in mobile i.e. after the apk build and opened in the device.
After the click, It shows below instead of redirecting to /uaa/login. so if understand correctly, redirection is not handled by default in ionic's webview? if so how to handle it?
I see the below console log from device inspect when above error comes.
Failed to load resource: the server responded with a status of 401 () /favicon.ico:1
There is no problem with inappbrowser. The back end server of the URL I'm loading in inappbrowser is having error in the logs. Resolved after fixing them
I am using file transfer plugin but anytime I trigger the download I got cors error and I have settled every cors error in my backend.
To be sure of this I copied an image url online and I tried downloading the image but I still getting cors error which means its a problem from ionic not my backend.
And also I would like to ask that how do you test the file transfer? because I run the command
ionic cordova run browser
to be able to test the plugin but i am not sure thats the right way maybe thats why I am having the cors issue…
Please help me.
I followed the beginner article for building Ionic PWAs:
https://www.joshmorony.com/the-bare-necessities-progressive-web-apps-in-ionic/
At what point should I see the "add to homescreen" option? I hosted the contents of the www folder on a development server with an SSL connection and domain name. The app works great, but I don't get presented with the homescreen option.
When setting the option for "display":"fullscreen" in the manifest.json, shouldn't the browser address bar disappear when accessing the web url of the hosted application?
Thank you in advance!
Okay, I got this working.
Make sure your on https and have a valid ssl cert
If your app is in a sub-directory, you need to add a scope parameter to your manifest (this is why mine wasn't triggering) and you need to start_url parameter should reflect that as well
Test te app in browser first:
https://developers.google.com/web/fundamentals/app-install-banners/
Let me know how that goes!