Getting the following error: Unhandled Exception: Invalid argument (callbackUrlScheme): must be a valid URL scheme: "appwrite-callback-myProjectID"
I have added the following to my AndroidManifest.xml:
<activity android:name="com.linusu.flutter_web_auth_2.CallbackActivity" android:exported="true">
<intent-filter android:label="flutter_web_auth_2">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="appwrite-callback-myProjectID" />
</intent-filter>
</activity>
How should I fix this?
Can you try changing your url scheme to the required format of a simple string (that is, without hyphens)?
You can try changing it to like appwritecallbackmyprojectid or appwriteCallbackMyProjectID instead.
Example:
<data android:scheme="appwritecallbackmyprojectid" />
In doing so, update your callback URLs everywhere you use them in your code to reflect the new scheme and avoid any other errors.
Sure. I'll try it and give you an update.
Still dosen't work
Actually I am having some Capital letters in my project ID. Is that an issue?
Sorry for the late reply. After doing the changes, is the error message the same?
ya...captial letters is a problem 😕 we've actually started talking about this internally to only allow lowercase alphanumeric characters for project ID to avoid this type of problem
FYI, it's best to wrap code in backticks to format a bit nicer. You can use 1 backtick for inline code (https://www.markdownguide.org/basic-syntax/#code) and 3 backticks for multiline code (https://www.markdownguide.org/extended-syntax/#syntax-highlighting.
Thanks for the info. Will keep that it mind next time.
Recommended threads
- Which flutter SDK version for Self Hoste...
Hi all, Is there a good way to figure out which version of flutter SDK and Dart SDK is current for latest available self-hosted 1.8.0 ? I know new features are...
- redirect_uri errors on flutter client
Hi all, I'm using the flutter client for my app to do appwrite auth and use the JWTs to send to my backend. When I try to sign in with SSO, I get this: https:/...
- Problem with getting rows from related t...
Hi, I migrated the Appwrite SDK to 1.8.0 and the package in my Flutter app to version ^20.3.2. I noticed one thing is different. Previously, when I got a JSON r...