flutter firebase dynamic links - wrong link is captured in app - firebase

I'm trying to capture the query paramters of a dynamic link.
In firebase console, the dynamic link is set as
myApp.page.link/myPage?par1=1,par2=2
The link that I build programmatically is:
http://myapp.page.link/myPage?st= Hi there &amv=0&apn=com.myapp&ibi=com.myapp&imv=0&link=https://myapp.page.link/myPage?par1=123&par=456
When I capture the link in the app, using FirebaseDynamicLinks.instance.onLink, I get
myApp.page.link/myPage?par1=1,par2=2
instead on the expected parameters par1=123, par2=456.
Flutter doctor has no errors
What can it be?

It looks like it might have been the fact that although I was using a device as an "emulator" in a debug mode.
Once using the "real" app from google store, the problem was gone :-)

Related

Generate Account Service JSON is not available in Firebase

In Firebase, I've always been able to generate Service Account JSON. Today, created a new project as always and could not find it. When I refresh the button does show briefly and disappear. I don't understand what is the problem and the documentation for generating an Admin SDK still says that you create a Service Account JSON with that button. You can see in the image below:
Can I have an explanation on why it is happening and how can I solve this?

How to fix firebase index issue?

While launching the react native expo app,got this prompt.
The query requires an index. You can create it here: https://console.firebase.google.com/v1/r/project/production-a9404/firestore/indexes?create_composite=Ck5wcm9qZWN0cy9wcm9kdWN0aW9uLWE5NDA0L2RhdGFiYXNlcy8oZGVmYXVsdCkvY29sbGVjdGlvbkdyb3Vwcy9jb2lucy9pbmRleGVzL18QARoMCghhdXRob3JJRBABGg0KCWNyZWF0ZWRBdBACGgwKCF9fbmFtZV9fEAI
When I clicked, the google console showing error as below.
But, this one worked earlier for a different collection and when trying for a new collection, getting this.
Please suggest.
It looks like you're signed in with an account that doesn't have permission to read or create indexes.
You should open the link from a user account that does have those permissions. When you do that, you'll see a screen that has all information prepopulated, and you can create the index with a single click (and some patience).

Why do I keep receiving an error when initializing my firebase project while setting up firestore?

I am learning how to set up and host a webpage through firebase, and when I attempt to initialize the project (by running firebase init in the firebase CLI) every time I reach the firestore setup portion, it always results in the same error.
It looks like you haven't used Cloud Firestore in this project before. Go to https://console.firebase.google.com/project/resume-site-599bc/firestore to create your Cloud Firestore database
When I copy and paste the link, it brings me to the firebase console page and says "your action was forbidden" no matter what I do. I have tried to go into the console settings and made sure all of the correct APIs are enabled. But there seems to be little help when I tried googling the issue.
Thank you.
I had the very same and error and fixed it with #MS29's method. More verbose for simplicity:
In the Firebase Dashboard, go to Project Settings -> General
Set "Default GCP resource location" again.
After that, the Firestore can be found again.
So even though I already had the project created and I created my Firestore database, my: Default GCP resource location didn't select properly when creating the project. Once I fixed this, it had no problem connecting to my database.
I've faced the same problem with Angular 14.2.0 and firebase 19.14. The solution for me was as follow:
I've checked the project list by using firebase cli:
firebase projects:list
There I noticed that the Resource Location ID wasn't set for any reasons. So I opened the settings of my firebase-project using the console (https://console.firebase.google.com/) and on project settings tab u can set the GCP. That's it
Look like you haven't create project on your firebase account
So firebase ask you go into the link to create project.
For the problem of "your action was forbidden",
it seem to be the problem of multi google accounts.
Google still work quite bad on multi accounts sometime.
You can try access the google firebase console main page by the link below.
https://console.firebase.google.com/u/0/
https://console.firebase.google.com/u/1/
The last number is the number of user. You can change it if you have many google accounts.
P.S. The user order will change if you logout.
Most likely that you don't have the project created in firebase. Either create a new project by going to
https://firebase.corp.google.com/u/0/
or enable Firebase for an existing GCP project by choosing that project in the add project page
it's happening same to me too, but in my case:
I already created the database at Firestore Cloud *at their website
for now I'm still troubled with it, if I have solution.
#update
hello, I'm in bandwagon when it comes to this problem: [firebase init firestore not work with existing project]
I'm using firebase CLI version 10.6.0
but somehow I manage to deal with it, here's my solution/timeline:
I install using firebase login --no-localhost because encounter problems with firebase login
encountered with errors: cannot install firestore but hosting part can.
try to reset database, created again but still get error: cannot install firestore
then I logout, then login using ONLY firebase login, not the firebase login --no-localhost
bang! solved!
hope it helps~

"Browser or app may not be secure. Try using a different browser." error with Flutter Firebase Google Login

I am using flutter web and firebase authentication to build a web app. For that
1. Created Firebase app with Google signin as one of the sign in methods.
2. Added the dependencies as given in https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_auth/firebase_auth/example
and https://dart-pub.mirrors.sjtug.sjtu.edu.cn/packages/firebase_auth_web.
When I try to login, the Google sign-in window appears. Once I enter the email address and press enter, it gives the following error.
"Couldn't sign you in This browser or app may not be secure. Try using
a different browser. If you’re already using a supported browser, you
can refresh your screen and try again to sign in."
I used Chrome browser.
What should I do to make my app more secure ? For android, we had the option of using SHA keys to encrypt the connection. Do we need to do something similar for web ?
Incomplete answer:
This problem isn't specific to flutter. It happens whenever you try to sign in to Google in a Chrome instance that has debugging turned on. In other words, if you, your automation software, or IDE starts up chrome with a command like chrome.exe --remote-debugging-port=9222
If running Chrome normally (out of debug mode) is not an option, then try https://support.google.com/accounts/thread/22873505?msgid=24501976 or if you are using Electron then try https://support.google.com/accounts/thread/22873505?msgid=24503570 but I, personally, haven't been able to make these work for me, yet.
Please upvote the question at https://support.google.com/accounts/thread/25209002 if you want a solution to this problem that actually works.
The issue was with the chrome developer version Flutter use to launch as a device. If we open the same URL (localhost:portnumber) in the normal chrome, it will work without any issue.
The following worked for me:
Go into your google account
select Manage Account
Security
Less secure app access (need to scroll down a little bit)
set to off
Then I was able to login in and debug in IntelliJ
(for me, for some reason, I had to create a new google account, couldn't get it working with my existing account but it worked with my new account)
You can use user agent switch to switch another browser (for example opera).
https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg
They try login. Once you successfully logged in you can remove or disable the extension.
I had the same problem with Firefox. The only way I could fix it was to create a new profile. So you could try to run Firefox with -p switch and create a new profile.
firefox -ProfileManager
firefox.exe -p
Update: check the firefox config (address field: about:config)
be sure marionette.enabled is false
For Test Automation Users-:I saw many testers are facing this issue for sign in using Google but I think below my idea will save their time.
Best Work Around is as below-:
Open automated Chrome browser as shown below
Sign up with new details which you want to use.
Now after successfully completion of sign up.
Then use that email and password for signing into gmail using Selenium or any other test automation tool

Crawl status saying it can't find any pages to index in my android app

Although I followed the below guide on my app (up to 7th step because I'm not interested in personal contents or on-device indexing):
Firebase appIndexing tutorial
And connected my app to firebase consol.
Also verified steps against "Get Started" guide:
Firebase AppIndex for Android Get Start guide
And followed steps included in Google guide to create deep link in app (except for reading data from coming intent section) as below link:
Google guide for creating deep link to app contents
I also verified the intent code in the manifest using adb command and got it successfully executed for specified url data (scheme, host, and pathPrefix) with added android:autoVerify="true".
The only thing I couldn't accomplish is to declare the "Digital Asset Links" file by uploading it to my website on Weebly, because I couldn't find a way through my search to do so.
Now, after I added the android app into my webmaster as a property and verified the ownership of my website on Weebly then associated the website to the app in the webmaster, I got the following message in the "Crawl status":
"We did not find any pages to index in your app
Your app pages must be found and indexed before Google can start showing them in search results. You can tell Google which pages to index in a sitemap or in web page markup, or if your website and app have identical page organization, Google can infer your app pages from their corresponding web pages."
I'm really stuck here, and don't know what else to do to index my app contents keywords into Google Play for users to find my app when they search these keywords.
Is there any steps I missed in order to have my app indexed? or is there any other method to make my app on Google Play found when searching for specific keywords (that's all what I want, and I created the website specially for this task)?
Thanks in advance for your help.
App Indexing is for finding app pages in Google search, not in Google Play.
Unfortunately, you do need to associate the Digital Asset file, but this is just a text file in a known location: you can see the details in https://developer.android.com/training/app-links/verify-site-associations

Resources