mapbox-navigation-ios icon indicating copy to clipboard operation
mapbox-navigation-ios copied to clipboard

[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)

Open Andybat99 opened this issue 2 years ago • 8 comments

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

Andybat99 avatar Dec 22 '23 05:12 Andybat99

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.

kried avatar Dec 22 '23 10:12 kried

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

Andybat99 avatar Dec 22 '23 11:12 Andybat99

i even tried saving the .netrc file from the terminal but still that didn't helped

Andybat99 avatar Dec 22 '23 11:12 Andybat99

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.

kried avatar Dec 22 '23 14:12 kried

nope token is fine and 2.18.-beta.1 did not work, I think it's just my MacBook

Andybat99 avatar Dec 22 '23 15:12 Andybat99

@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

AakifNumrah avatar Jan 08 '24 07:01 AakifNumrah

@Andybat99 did you ever get it solved ?

7thQ avatar Mar 12 '24 02:03 7thQ

Hi @Andybat99 Please try v2.18.0 release, which removes the dependency on MapboxMobileEvents

kried avatar Apr 29 '24 10:04 kried

Hi everyone

I found a solution, according to the documentation there are three steps:

  1. In Xcode, go to File ‣ Swift Packages ‣ Add Package Dependency.
  2. 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

PopovVA avatar Jul 24 '24 16:07 PopovVA