[Bug]: failed downloading 'https://api.mapbox.com/downloads/v2/mapbox-events-ios/releases/ios/packages/1.0.10/MapboxMobileEvents.zip' which is required by binary target 'MapboxMobileEvents': badResponseStatusCode(401)
Mapbox Navigation SDK version
2.17.0
Steps to reproduce
I tried everything to fix it what I have no idea on what's going on
Expected behavior
downloading
Actual behavior
Showing Recent Errors Only failed downloading 'https://api.mapbox.com/downloads/v2/mobile-maps-core/releases/ios/packages/10.16.3/MapboxCoreMaps.xcframework-dynamic.zip' which is required by binary target 'MapboxCoreMaps': badResponseStatusCode(401)
failed downloading 'https://api.mapbox.com/downloads/v2/mobile-navigation-native/releases/ios/packages/160.0.1/MapboxNavigationNative.xcframework.zip' which is required by binary target 'MapboxNavigationNative': badResponseStatusCode(401)
failed downloading 'https://api.mapbox.com/downloads/v2/mapbox-events-ios/releases/ios/packages/1.0.10/MapboxMobileEvents.zip' which is required by binary target 'MapboxMobileEvents': badResponseStatusCode(401)
failed downloading 'https://api.mapbox.com/downloads/v2/mapbox-common/releases/ios/packages/23.8.5/MapboxCommon.zip' which is required by binary target 'MapboxCommon': badResponseStatusCode(401)
fatalError
Is this a one-time issue or a repeatable issue?
one-time
Hi @Andybat99
Please check that you have correctly configured your secret token https://docs.mapbox.com/ios/navigation/guides/get-started/install/#configure-credentials Please try to clean the Xcode DerivedData and SPM cache and try to resolve dependencies once again.
I tried everything with the token but I don't think it's that since I am installing 3/4 of the download. Tried to clean everything but still no luck
i even tried saving the .netrc file from the terminal but still that didn't helped
Please check that you have the .netrc file in the system in the location ~/.netrc.
From the logs you attached in the issues description it seems like all 4 Mapbox binary dependencies were not downloaded. .netrc file with the configured secret token is required to download all Mapbox dependencies.
You can try to use 2.18.0-beta.1 version that does not depend on MapboxMobileEvents so you can check if other libraries are downloaded.
nope token is fine and 2.18.-beta.1 did not work, I think it's just my MacBook
@Andybat99 I got the same error as well after updating my Xcode to Version 15.1. But I got it resolved by reinstalling .netrc file. Try doing:
touch ~/.netrc echo "machine api.mapbox.com" > ~/.netrc echo "login mapbox" >> ~/.netrc echo "password <INSERT API TOKEN>" >> ~/.netrc
@Andybat99 did you ever get it solved ?
Hi @Andybat99 Please try v2.18.0 release, which removes the dependency on MapboxMobileEvents
Hi everyone
I found a solution, according to the documentation there are three steps:
- In Xcode, go to File ‣ Swift Packages ‣ Add Package Dependency.
- Enter https://github.com/mapbox/mapbox-navigation-ios.git as the package repository and click Next. 3. Set Rules to Version, Up to Next Major, and enter 3.1.0 as the minimum version requirement. Click Next. - That what you need to do