mapbox / mapbox-vision-android-teaser

Other
29 stars 13 forks source link

403 Forbidden with API token #123

Open rhythmize opened 4 years ago

rhythmize commented 4 years ago

@korshaknn , As suggested by you. I'm trying to build the examples for this repo. Following is the build output.

Could not GET 'https://api.mapbox.com/downloads/v1/vision/android/maven/com/mapbox/vision/mapbox-android-vision/0.8.0/mapbox-android-vision-0.8.0.pom'. Received status code 403 from server: Forbidden Enable Gradle 'offline mode' and sync project

I'm using a freshly generated token.

Please suggest.

korshaknn commented 4 years ago

@code-player have you added the token to gradle? Use gradle.properties file or add directly to credentials { username project.properties['mapboxMavenUser'] ?: "" password project.properties['mapboxMavenToken'] ?: "" }

rhythmize commented 4 years ago

I added token in developer-config file. And Updated in gradle scripts too.

username project.properties['mapboxMavenUser'] ?: "rhythm-tonbo"
password project.properties['mapboxMavenToken'] ?: "<my-token-here>"

I tried with mapbox as username as well. Nothing works.

yunikkk commented 4 years ago

@code-player hi, have you checked the docs https://vision.mapbox.com/install/ here? Auth should look like

maven {
  url 'https://api.mapbox.com/downloads/v1/vision/android/maven'
  authentication {
    basic(BasicAuthentication)
  }
  credentials {
    username = 'mapbox'
    password = 'ADD-YOUR-TOKEN'
  }
}

according to it

rhythmize commented 4 years ago

Its exactly the same. Still I get 403 Forbidden.

maven {
            url 'https://api.mapbox.com/downloads/v1/vision/android/maven'
            authentication {
                basic(BasicAuthentication)
            }
            credentials {
                username = "mapbox"
                password = "my-token-here"
            }
        }
rhythmize commented 4 years ago

Looks like it's unable to authenticate my token.

yunikkk commented 4 years ago

@code-player does your token contain vision:download scope? It's necessary to be able to download Vision libraries. Please check Import Vision into your project with a package manager (Recommended) section at https://vision.mapbox.com/install/

rhythmize commented 4 years ago

Yeah, created a new token with said scope. But now, following is the error.

Crashlytics found an invalid API key: null. 
Check the Crashlytics plugin to make sure that the application has been added successfully! 
Contact support@fabric.io for assistance.
yunikkk commented 4 years ago

Ah, this is the issue https://github.com/mapbox/mapbox-vision-android-teaser/issues/43, there is temporary solution described there

rhythmize commented 4 years ago

Which token am I supposed to provide there? Can I use the one I got from mapbox? It responds as invalid token if I user mapbox token

rhythmize commented 4 years ago

Alright, got it working now. !! But the error log still persists.

2019-09-05 12:43:14.681 27652-27737/com.mapbox.vision.teaser.debug E/linker: library "/vendor/lib64/libOpenCL.so" ("/system/vendor/lib64/libOpenCL.so") needed or dlopened by "/data/app/com.mapbox.vision.teaser.debug-NGn3S_pVAhhHnYjbtFPdYg==/lib/arm64/libSNPE.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/com.mapbox.vision.teaser.debug-NGn3S_pVAhhHnYjbtFPdYg==/lib/arm64:/data/app/com.mapbox.vision.teaser.debug-NGn3S_pVAhhHnYjbtFPdYg==/base.apk!/lib/arm64-v8a", permitted_paths="/data:/mnt/expand:/data/data/com.mapbox.vision.teaser.debug"]

Please suggest.

rhythmize commented 4 years ago

@yunikkk, even in the demo app, I don't see any overlay/ icon in the app. All I get is simple camera feed, for example, lane detection does not show any overlay highlighting the lane/ direction.

Please suggest.

kiryldz commented 4 years ago

@rhythmize - what device are you using for testing?

yunikkk commented 4 years ago

Closing dut to inactivity, feel free to reopen.

Charfedine commented 3 years ago

hey @rhythmize if you please provide the solution that worked for you, because i tried like you and still the same error

yunikkk commented 3 years ago

@Charfedine which error exactly do you have?

Charfedine commented 3 years ago

@yunikkk when i wrote the comment it was 403 Forbidden with API, which i managed to fix by changing the username to mapbox and check the DOWNLOADS:READ secret scope.

But now i get this : - "Failed to resolve: com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0"

yunikkk commented 3 years ago

Do you try to build this repo? We don't have com.mapbox.navigation:ui:1.5.1 in the dependencies here, maybe you've modified gradle configs somehow?

Charfedine commented 3 years ago

Yes I tried to build it but keep getting "Caused by: org.gradle.api.InvalidUserDataException: You haven't set MAPBOX_ACCESS_TOKEN." despite the fact that i set it as a env variable ! That's what led me to the other error when i tried to adapte mapbox to a new project

Charfedine commented 3 years ago

"Received status code 403 from server: Forbidden" is back !

splasky commented 3 years ago

Hi @Charfedine. I had met the same problem. Did you solve yet?

Charfedine commented 3 years ago

@splasky no i didn't sorry

bacarPereira commented 3 years ago

@splasky create a new token here and then check the option DOWLOADS: READS

mapBox
splasky commented 3 years ago

@splasky create a new token here and then check the option DOWLOADS: READS

mapBox

OK, It works. Thanks!

OlavAa commented 3 years ago

I have the same problem yesterday and today. I was eventually successful yesterday using the: com.mapbox.maps:android:10.0.0-beta.19

Eventually (after trying a lot of times and in frustration pasting in the key directly into the project build.gradle). I think it is a general problem, because when I now try with another Android project the problem is back. Tried to make a new key, tried to use a different Mapbox account, tried to use the gradle.properties and pasting password directly in. But I do not get passed the build: Unable to resolve dependency for ':Android@dhpilotDebug/compileClasspath': Could not resolve com.mapbox.maps:android:10.0.0-beta.20. Show Details Affected Modules: Android

and `FAILURE: Build failed with an exception.

yunikkk commented 3 years ago

We've updated the docs that should fix all the issues with tokens, please take a look https://docs.mapbox.com/android/vision/guides/install/

sabramooz commented 2 years ago

You must use this documentation to resolve this problem: https://github.com/react-native-mapbox-gl/maps/blob/master/android/install.md

yunikkk commented 2 years ago

You must use this documentation to resolve this problem: https://github.com/react-native-mapbox-gl/maps/blob/master/android/install.md

@sabramooz not sure why this specific doc from react-native repo was mentioned. We now have correct documentation about updated maven configuration at https://docs.mapbox.com/android/vision/guides/install/

sabramooz commented 2 years ago

You must use this documentation to resolve this problem: https://github.com/react-native-mapbox-gl/maps/blob/master/android/install.md

@sabramooz not sure why this specific doc from react-native repo was mentioned. We now have correct documentation about updated maven configuration at https://docs.mapbox.com/android/vision/guides/install/

Thanks, this works too.

teju commented 2 years ago

here

i'm unable to see secret scope list. please help

amirahmadadibi commented 2 years ago

this is most annouing and undervalued shit problem that you have, fix it like real person or team or what ever. you are not doing it right. error is still hanging mapbox-android-sdk-9.6.1.pom'. Received status code 403 from server: Request blocked by Privoxy

vitali-itechart commented 1 year ago

I followed all the instructions described and nothing helped, same project works for the rest of the team but I'm still getting 403. Is there a workaround for that or something? Maybe I can download it manually or kind of get from a repo that doesn't keep a goddam SDK under a password like it's usually done?

seprinta commented 4 months ago

i also have same case in my website, which has tracking user current location fiture , but i using free access token , so i look for information why it forbidden 403 , i just want to make sure that i should create new account to get new access token for the tilequery map API then the map will works with the new access token , or probably any better solutions for this case ?

LuixDev commented 1 month ago

ya no funciona mapbox_gl quedo absoleto le recomiendo que use otra libreria

isaaclacoba commented 2 weeks ago

@Code-Player does your token contain vision:download scope? It's necessary to be able to download Vision libraries. Please check Import Vision into your project with a package manager (Recommended) section at https://vision.mapbox.com/install/

For future victims of this bullshit, while generating the token, remember to add the permissions required to download.