Skip to content
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

ArgumentError when calling _tileStore.setMapboxAPIUrl with Uri #851

Open
tchengck opened this issue Jan 29, 2025 · 0 comments
Open

ArgumentError when calling _tileStore.setMapboxAPIUrl with Uri #851

tchengck opened this issue Jan 29, 2025 · 0 comments

Comments

@tchengck
Copy link

Description:
I encountered an issue when calling _tileStore.setMapboxAPIUrl(Uri.parse('https://api.mapbox.com/'));. This results in the following exception:

ArgumentError (Invalid argument: Instance of '_SimpleUri')

Steps to Reproduce:

  1. Call _tileStore.setMapboxAPIUrl(Uri.parse('https://api.mapbox.com'));
  2. Observe the exception being thrown.

Expected Behavior:

The function should accept the parsed URI and not throw an ArgumentError.

Actual Behavior:

The function throws ArgumentError (Invalid argument: Instance of '_SimpleUri').

Possible Cause:

It seems like _tileStore.setMapboxAPIUrl might be expecting a String instead of a Uri object, as described in its documentation: "Accepts a string, or null for resetting to the default value." If this is the case, the method should ensure proper type handling.

Environment:

  • Package Version: 2.5.1
  • Platform: Android and iOS

Additional Context:

Any insights into whether this is an expected behavior or a bug would be appreciated. If _tileStore.setMapboxAPIUrl is meant to accept a Uri, it might need an update to handle this exception properly.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant