Server Graphhopper with different version then the iOS
tnmendes opened this issue · 3 comments
tnmendes commented
Do i need to have Graphhopper in the same version as the GH of iOS?
Right now the server is 9.0 and the iOS app in version 8.2.
This is the error that i am having
2017-08-09 12:10:02.352 graphhopper-ios-sample[4442:3718897] *** Terminating app due to uncaught exception 'JavaLangIllegalStateException', reason: 'Encoding does not match:
Graphhopper config: car|speed_factor=5.0|speed_bits=5|turn_costs=false|version=1
Graph: car|speed_factor=5.0|speed_bits=5|turn_costs=false|version=1,foot|speed_factor=1.0|speed_bits=4|turn_costs=false|version=3, dir:/Users/tnmendes/Library/Developer/CoreSimulator/Devices/D0B97E86-16C8-414D-9621-ECCC904BCF91/data/Containers/Bundle/Application/AB8A70FE-DEB1-4658-B1D9-DC866E7CE616/graphhopper-ios-sample.app/graph-data.osm-gh/'
*** First throw call stack:
(
0 CoreFoundation 0x02198ded __exceptionPreprocess + 189
1 libobjc.A.dylib 0x01c63d6f objc_exception_throw + 49
2 graphhopper-ios-sample 0x0012c881 -[GraphHopperStorage loadExisting] + 673
3 graphhopper-ios-sample 0x0007f3e4 -[GraphHopper load__WithNSString:] + 3604
4 graphhopper-ios-sample 0x0005b705 -[Directions hopper] + 565
5 graphhopper-ios-sample 0x0005be95 __19-[Directions route]_block_invoke + 805
6 libdispatch.dylib 0x03f0ef05 _dispatch_call_block_and_release + 15
7 libdispatch.dylib 0x03f39cc9 _dispatch_client_callout + 14
8 libdispatch.dylib 0x03f17ba0 _dispatch_queue_override_invoke + 876
9 libdispatch.dylib 0x03f1a33e _dispatch_root_queue_drain + 1162
10 libdispatch.dylib 0x03f19e4c _dispatch_worker_thread3 + 138
11 libsystem_pthread.dylib 0x04298d6e _pthread_wqthread + 1070
12 libsystem_pthread.dylib 0x0429891a start_wqthread + 34
)
libc++abi.dylib: terminating with uncaught exception of type JavaLangIllegalStateException
clns commented
Yes, both should be the same version. The error message also suggests this.
tnmendes commented
The problem was this line in the code...I just need to remove to work
hopper.setEncodingManagerWith(EncodingManager.init(nsString: "car"))