Custom app installation shows 404 page while requesting authentication code

Question:
Custom app installation will redirect me to https://www.wix.com/installer/undefined instead of redirect url with authentication code as param

Product:
Wix studio custom apps

What are you trying to achieve:
I’m trying to get an access_token to make Wix API calls

What have you already tried:
I have tried changing the redirect URL to heroku backend URL. It still showed the same error

Additional information:

  • Steps to reproduce
    • Create a Wix website from a template and publish
    • Create a blank app with Wix Blocks and publish
    • Update the appUrl to https://example.com and redirectUrl to https://example.com in the app’s oauth page
    • Open the install link. User is redirected to https://example.com/?token=xyz
    • Create an install link with params token, redirectUrl and appId (https://www.wix.com/installer/install?token=xyz&redirectUrl=https://example.com&appId=abc)
    • Open the install link and click “Agree & Add”
    • User is redirected to 404 error page (https://www.wix.com/installer/undefined) instead of redirectUrl with authentication token

Can you Elaborate of what u have already tried ?

I have tried

  • Using the exact redirect URL mentioned in the tutorial (https://example.com)
  • Using the redirect URL with “www.” (https://www.example.com)
  • Encoding the redirect URL in the install link (https://www.wix.com/installer/install?token=xyz&redirectUrl=https%3A%2F%2Fexample.com&appId=abc)
  • Tried using heroku backend URL as redirect URL and app URL instead of https://example.com

can you share complete details on my mail so that we can start with further help email: fiza@astrosia.in

@Tech_Voyager
I have the same problem, i’ve been trying to fix it for days now but I did not find a solution! Can you please tell me if you found a solution ??

@Joel_CJ

I have the same problem, i’ve been trying to fix it for days now but I did not find a solution! Can you please tell me if you found a solution ??

The error was caused by the widget in Wix Blocks. One workaround is to delete the widget in block editor
Steps:

  1. Go to the app’s home page and click “Edit in Blocks”
  2. Delete the widget