This is almost a PR, but I don't have time to get the build running locally at the moment.
We've been seeing errors logged from [MGLNetworkConfiguration errorLog:] with incomplete messages that look like Requesting: (null) failed with error: <MGLNetworkConfiguration: 0x60000291ea60>.
Why is the URL (null)? Why is the error an instance of MGLNetworkConfiguration?
That line 👆 calls this implementation 👇 of errorLog, passing in a format string as the first arg and the URL path and error object as variadic arguments. When it calls the delegate implementation, it only passes the format string and drops the variadic args.
This is almost a PR, but I don't have time to get the build running locally at the moment.
We've been seeing errors logged from
[MGLNetworkConfiguration errorLog:]
with incomplete messages that look likeRequesting: (null) failed with error: <MGLNetworkConfiguration: 0x60000291ea60>
.Why is the URL
(null)
? Why is the error an instance ofMGLNetworkConfiguration
?That message comes from here:
https://github.com/mapbox/mapbox-gl-native/blob/0895c698d95d8ea35cb7dc35f667736f26f0e098/platform/darwin/src/http_file_source.mm#L279
That line 👆 calls this implementation 👇 of
errorLog
, passing in a format string as the first arg and the URL path and error object as variadic arguments. When it calls the delegate implementation, it only passes the format string and drops the variadic args.https://github.com/mapbox/mapbox-gl-native/blob/9e189e02b4a66fa7003631135814b70eff7360ef/platform/darwin/src/native_apple_interface.m#L69-L72
(The matching
getError
implementation that this calls in https://github.com/mapbox/mapbox-gl-native-ios has the same problem, taking variadic args and again dropping them. I opened https://github.com/mapbox/mapbox-gl-native-ios/issues/347 to track that side.)