-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Saving the Google Ads Refresh Token #179
Comments
I got the same error. :) |
Can you guys please make sure:
If you have set it up correctly, and it still does not work, try creating the AdWords accounts first by following steps 4 and 5 of the documentation. |
I have already an Adwords account. Does it need to be a new one? I will test ASAP. |
You need 2 AdWords accounts, a test account, and a manager account. |
same problem here, cant fix it with the 2 adword accounts etc |
same here. Fresh install of SerpBear, did everything like described in the docs but after the oauth2 flow: Logs show:
|
Yes Google Ads API is enabled. |
Ok, I just ran a test with a fresh Google account. It worked fine. I didn't need to create the Google ads accounts.
Can you please try the above? |
|
I captured the whole client id and client secret creation process. Please watch the video and see if you are doing anything wrong: https://erevanto.sirv.com/videos/serpbear_adwords_step1.mp4 |
I missed to publish the application, this step was missing at https://docs.serpbear.com/miscellaneous/integrate-google-ads |
I did everything exactly like in the video but still having the error. @bananasplit8041 do you run it on localhost? |
i have the same problem, i'm on http not "s" and can't publish the app, maybe this is the problem? |
You don't have to have a https URL to publish the app. Notice in the video I shared, I used a non-https URL. What error do you get when you try to publish the consent screen? |
no i run it on fly.io! now I'm failing at the dev token: EDIT: now its working! need to click on https://ads.google.com/nav/selectaccount?sf=mt wow, magic! really like this tool!! |
i have error on consent screen that public must have https and cannot publish on htttp anyway in http://localhost i can publish the app but the error remains |
no matther what i do.. i can't save that fucking google ads credential |
I have tried running it locally, just to ensure it's not a Google account setting and it works. Behind a reverse proxy (domain with private ip associated) for me it doesn't. |
@MyWay Go to Google Cloud Dashboard > API & Services > Credentials > OAuth Consent Screen, click the "Edit App" button, and try adding your domain in the "Authorized Domains" section. Then wait a few minutes or an hour and try again. |
I did that already, but it doesn't work. |
@MyWay Did you check the log? What error do you get? |
Sometimes I get the same error as reported by others, sometimes I get redirect_uri_mismatch, though the uri is correct and I did set the same https://domain to NEXT_PUBLIC_APP_URL. |
Setting up the Google Cloud project and API with a different Google account didn't help, still the same error. |
For those using a reverse proxy who don't want to wait for an official fix, I solved by running another instance on the fly locally, on localhost (using the same data for SECRET and so on, otherwise serpbear won't be able to decrypt data anymore) and then copied the settings.json from the local working instance to the remote one. Please backup everything before proceeding. And remember to stop your instance before moving things. I cannot guarantee it will work for you too. I did test it on docker + reverse proxy. |
@MyWay I am not well-versed with reverse proxy stuff. Can you see if this helps: |
I have written numerous OAuth2 integrations for various APIs, and we have never had to make any modifications to connect from localhost or production. |
@m4nug That would be very much appreciated! |
I tried all of the above. I was on Synology/docker/reverse proxy, all steps were done as instructed, env variables were ok, app published, etc... still got the same error. Deployed fresh on a DO droplet, assigned domain, SSL, and all, everything was done properly again with a new Google account/ new ads account, yet still getting the same error. So, clearly, something is wrong here. |
@graphiostudio Are you getting the same invalid_grant error in the DO droplet or is it something different? Is your Google account a workspace account with a custom domain or |
cards linked to both accounts. first try was with gmail.com account, second one is a custom domain/workspace account. I was getting the same error, then I played around with URLs, and SSL a bit and now getting this, but when I use correct URLs and SSL, still keeps getting the previous error. Hope it helps.
|
@graphiostudio Can you make sure your |
Hi, it does match. Still same issue whatever I do. |
I did try it within the dev environment which was successful and then (of course) it also worked after I have added a reverse proxy to the dev environment... So as @towfiqi i was not able to reproduce the error in dev, so it could be related to running the app in docker. I'll investigate further. |
I am using Nginx as a proxy and Serpbear in docker. I tried all different things and always get the same token error as from the logs above. |
Got same error, I am trying all of these way bellow but didn't working
Running on personal server |
@dangson92 Are you seeing |
I see this |
|
I think what people are trying to say is (my case too), even the steps are complete, ENV set and URLs perfectly matching (ENV url=GAuth URL), a lot of people are still having the same issue. They're matching, yet I'm still getting mismatch error. 3 accounts, 3 different deployments so far, same issue. |
@graphiostudio Your initial error was |
Yeb... Funny thing is when I was getting |
when you approve the Google authentication by selecting your Google Account, you are redirected to a page that displays the error message. what is that URL? Does that URL match the redirect URL set in the Google Auth redirect setting? |
VIDEO REMOVED is this correct?
That's the error I'm getting... |
can you please share a screenshot of the redirect URL you set in the Google Auth settings? |
Sure. IMAGES REMOVED Billing is ok too, using this account actively... |
Did you add a test user to your auth consent settings? The test user should be the user email address that you are using to authenticate the integration. |
Yes... If I don't publish the app and add test user with same email address (I actually tried different emails as well) I'm still getting the same error. If I publish the app I don't need test users anymore, but yeah, still same results. I thought it might be browser, caching, cookies issue and tried different clean browsers as well, same results... |
That's very strange. All your settings are correct. I only tried the integration with localhost and not with an actual domain. However, another user mentioned, that it worked fine for them with an actual domain. I will run some tests with an actual domain and report back. |
All good man, just letting you know because we love this project and want to see it go places!!!... Just take it as a bug report :) hope it helps for further development |
@towfiqi I think problem from the my actual domain. I check everything and all well done. The NEXT_PUBLIC_APP_URL is ok, Return url when I authenticated with google is ok |
@graphiostudio Just ran the app on a live server with an actual domain, and everything worked fine. However, I did not use Docker. Are you running the app with Docker? |
Turns out it was a bug specific to how Nextjs handles the So, those who are having this issue, update to version |
Great news. Thanks for your hard work and sorry I couldn't find more time to help you. |
@m4nug No worries! |
Worked on the first try now :) awesome, thank you. |
Worked like a charm now. :) |
hi, i have a domain/portforward from duckdns to my fritzbox.
Edit and add the API URL: The tool works fine with the duckdns url... The Google Search Console Integrate works fine. but the Integrate Google Ads dont work, and i have the Error: "Error Saving the Google Ads Refresh Token . Details: redirect_uri_mismatch. Please Try Again!" SerpBear |
When trying to authenticate with Google Ads account, getting this: "Error Saving the Google Ads Refresh Token. Please Try Again!". Container volume is writable. Logs are as below:
The text was updated successfully, but these errors were encountered: