Please provide the following information about your environment:
After updating my xCode to version 11 and installing the application on an iPad running iOS 13.4, the application will crash when running in release mode when ever I attempt to place a model into my scene. It is working as it was previously when running in debug mode.
The xCode error is as follows:
2020-04-03 16:38:56.667369+1100 App[474:40728] -[NSURLResponse statusCode]: unrecognized selector sent to instance 0x283460a80
2020-04-03 16:38:56.668106+1100 App[474:40728] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURLResponse statusCode]: unrecognized selector sent to instance 0x283460a80'
*** First throw call stack:
(0x1a1dae164 0x1a1ac2c1c 0x1a1cac7e0 0x1a1db285c 0x1a1db4b60 0x102631ef4 0x1a506de88 0x1a507ecb8 0x1a218288c 0x1a20847cc 0x1a2184bcc 0x1a20844a4 0x1a21855f8 0x1a21850b8 0x1035925dc 0x10358318c 0x103585ff0 0x1035853c4 0x103595690 0x103596030 0x1a1ab56d8 0x1a1abb9c8)
libc++abi.dylib: terminating with uncaught exception of type NSException
Just wondering if anyone else has run into an error like this before when updating and if they have any insights on how to make it work. I am not sure where the NSUrlResponse is being called from within ViroReact to really debug this any further, any more questions I will provide as much detail as possible.
@dthian Hey mate, you seem to be the main contributor to this repo atm, have you seen anything like this? I have noticed a few others having issues with crashes on 13.4 as well (a few new issues). Just hoping you might of had some thoughts on how to resolve this.
Cheers!
@dthian Hey mate, you seem to be the main contributor to this repo atm, have you seen anything like this? I have noticed a few others having issues with crashes on 13.4 as well (a few new issues). Just hoping you might of had some thoughts on how to resolve this.
Cheers!
Yes, would be amazing to know if is someone still contributing or if it's abandoned at the moment. :p
Hey @TimonSotiropoulos, I'm not really a main contributor for ViroReact, although I try to help answer github issues now and then : )
@Kulcanhez unfortunately contributions have been low - but you are always welcomed to submit code change PRs : )
The above crash does look like a Signature versioning issue. If you look through the ViroCore source, I think 3D model loading is done via here. So perhaps an API signature has changed there.
Hey @TimonSotiropoulos. So it turns out to actually be a super quick fix. The new XCode version APIs must have changed some signatures of the dataTaskWithURL response. I've made a change in ViroCore and pushed it in.
The fix can be seen here.
The pipelines are currently building the renderer here.
The output of it should resolve your issue. Feel free to follow the ReadMe instructions in pulling them into ViroReact.
Hey @TimonSotiropoulos, I'm not really a main contributor for ViroReact, although I try to help answer github issues now and then : )
@Kulcanhez unfortunately contributions have been low - but you are always welcomed to submit code change PRs : )
The above crash does look like a Signature versioning issue. If you look through the ViroCore source, I think 3D model loading is done via here. So perhaps an API signature has changed there.
I would like to, but I'm still an apprentice ahahah 馃槤 really thank you for your contribuition. I'm going to test it.
I also experienced the same issue. thank you for the quick fix.
how to merge the new version into the existing viro? I created the project using react-viro init HelloWorld
@dthian Amazing stuff mate! Thanks so much for fixing this up!
Just so it's super clear for me, has this been deployed to Viro so if I download the package again it will be fixed? Or will i need to manually patch the .cpp file myself (either is possible just wondering!)
Cheers for the help =D
Just saw the Readme instructions, will have a go at that and let you know if I have any other issues!
Ah got all this to work, only trick was that you had to clone the repo into a folder called viro as when you pull it down it saves it normally saves it into viro-react (the name of the repo must of changed at some point). Thanks for your help again!
Hi,
Just in case this interests someone else, here are the steps I figured out to be able to build an app that doesn't crash with iOS 13.4 (and tried to not reference to UIWebView that will not be accepted on the App Store by Apple anymore after December 2020, but it didn't work), losely inspired from several issues and forks and the various Viro README instructions.
_Disclaimer_: I am very unexperienced with this kind of manoeuvre, and as such, some or all of this might actually be clumsy or unnecessary, but it worked for me:
git clone https://github.com/mendix/virocore/NSURLResponse crash: git reset 621b2524f44f8e93a08085b3770d457f5e002e43 --hardgit clone https://github.com/mendix/viro.gitgit checkout build and git reset ecc4a15e456aeea57d782e189ca2318b829958f5 --hard$ cd virocore/ios/ and $ pod installViroRenderer.xcworkspace in Xcode (make sure you open the .xcworkpace file, and not the .xcodeproj file!). Build ViroKit scheme with Build Configuration set to Release and target set to Generic iOS Deviceios/Pods/Target Support Files in ios/Pods/Pods/Target Support Files. If so, copy/paste all files and folders from ios/Pods to ios/Pods/Podsarmv7_arm64 folder and updated ViroKit.podspec file in the viro/ios/dist/ViroRenderer folder$ cd viro and $ npm install$ cd viro/ios and $ pod installViroReact scheme with Build Configuration set to Release and target set to Generic iOS DevicelibViroReact.a at ios/dist/lib/libViroReact.ayour_project/node_modules/react-viro/ios/dist/lib/libViroReact.a with the newly generated ios/dist/lib/libViroReact.ayour_project/node_modules/react-viro/ios/dist/ViroRenderer with the one from viro/ios/dist/ViroRendererIf this also helps someone, here are my fixed libViroReact.a and ViroRenderer: https://drive.google.com/file/d/1X09c3UUpl7g9MhyJOOwFrMzYMnA0eyx7/view?usp=sharing
Huge thanks to all the contributors that enabled me to patch this together, and especially @dthian, @HedwigJDoets and @HedwigAR!
Hello, I encountered the same issue on the latest iOS 13.5, I tried to patch with your artefacts (thanks for sharing!), but unfortunately after running VR code app displays a white screen. After reverting to npm version everything works well. Any ideas?
Edit:
Ah I guess its because GVR has been removed. Thanks anyway!
Hi,
Just in case this interests someone else, here are the steps I figured out to be able to build an app that doesn't crash with iOS 13.4 (and tried to not reference to UIWebView that will not be accepted on the App Store by Apple anymore after December 2020, but it didn't work), losely inspired from several issues and forks and the various Viro README instructions.
_Disclaimer_: I am very unexperienced with this kind of manoeuvre, and as such, some or all of this might actually be clumsy or unnecessary, but it worked for me:
- Clone the repo into your workspace with git:
git clone https://github.com/mendix/virocore/- Revert to the commit with the fix for
NSURLResponsecrash:git reset 621b2524f44f8e93a08085b3770d457f5e002e43 --hard- Clone the react-viro repo (named viro) in the same workspace (same parent directory as virocore) with git:
git clone https://github.com/mendix/viro.git- Revert to commit with the fix for UIWebView deprecation:
git checkout buildandgit reset ecc4a15e456aeea57d782e189ca2318b829958f5 --hard$ cd virocore/ios/and$ pod install- Open
ViroRenderer.xcworkspacein Xcode (make sure you open the.xcworkpacefile, and _not_ the.xcodeprojfile!). BuildViroKitscheme with Build Configuration set toReleaseand target set toGeneric iOS Device- (Optional) A build error might happen as Xcode tries to find
ios/Pods/Target Support Filesinios/Pods/Pods/Target Support Files. If so, copy/paste all files and folders fromios/Podstoios/Pods/Pods- When the build succeeds, you should see an updated
armv7_arm64folder and updatedViroKit.podspecfile in theviro/ios/dist/ViroRendererfolder$ cd viroand$ npm install$ cd viro/iosand$ pod install- Open ViroReact.xcworkspace in Xcode.
- Build
ViroReactscheme with Build Configuration set toReleaseand target set toGeneric iOS Device- You should see a new file
libViroReact.aatios/dist/lib/libViroReact.a- Replace
your_project/node_modules/react-viro/ios/dist/lib/libViroReact.awith the newly generatedios/dist/lib/libViroReact.a- Replace
your_project/node_modules/react-viro/ios/dist/ViroRendererwith the one fromviro/ios/dist/ViroRenderer- Build your project
If this also helps someone, here are my fixed
libViroReact.aandViroRenderer: https://drive.google.com/file/d/1X09c3UUpl7g9MhyJOOwFrMzYMnA0eyx7/view?usp=sharingHuge thanks to all the contributors that enabled me to patch this together, and especially @dthian, @HedwigJDoets and @HedwigAR!
HEY !!!
YOU SAVED MY LIFE <3
this solution worked for me but when i want to upload the app to appStore they reject because: Deprecated API Usage (UIWebView)
any help...?
@dthian Amazing stuff mate! Thanks so much for fixing this up!
Just so it's super clear for me, has this been deployed to Viro so if I download the package again it will be fixed? Or will i need to manually patch the .cpp file myself (either is possible just wondering!)
Cheers for the help =D
Just saw the Readme instructions, will have a go at that and let you know if I have any other issues!
same issue, please tell me how to fix it
Most helpful comment
Hi,
Just in case this interests someone else, here are the steps I figured out to be able to build an app that doesn't crash with iOS 13.4 (and tried to not reference to UIWebView that will not be accepted on the App Store by Apple anymore after December 2020, but it didn't work), losely inspired from several issues and forks and the various Viro README instructions.
_Disclaimer_: I am very unexperienced with this kind of manoeuvre, and as such, some or all of this might actually be clumsy or unnecessary, but it worked for me:
git clone https://github.com/mendix/virocore/NSURLResponsecrash:git reset 621b2524f44f8e93a08085b3770d457f5e002e43 --hardgit clone https://github.com/mendix/viro.gitgit checkout buildandgit reset ecc4a15e456aeea57d782e189ca2318b829958f5 --hard$ cd virocore/ios/and$ pod installViroRenderer.xcworkspacein Xcode (make sure you open the.xcworkpacefile, and not the.xcodeprojfile!). BuildViroKitscheme with Build Configuration set toReleaseand target set toGeneric iOS Deviceios/Pods/Target Support Filesinios/Pods/Pods/Target Support Files. If so, copy/paste all files and folders fromios/Podstoios/Pods/Podsarmv7_arm64folder and updatedViroKit.podspecfile in theviro/ios/dist/ViroRendererfolder$ cd viroand$ npm install$ cd viro/iosand$ pod installViroReactscheme with Build Configuration set toReleaseand target set toGeneric iOS DevicelibViroReact.aatios/dist/lib/libViroReact.ayour_project/node_modules/react-viro/ios/dist/lib/libViroReact.awith the newly generatedios/dist/lib/libViroReact.ayour_project/node_modules/react-viro/ios/dist/ViroRendererwith the one fromviro/ios/dist/ViroRendererIf this also helps someone, here are my fixed
libViroReact.aandViroRenderer: https://drive.google.com/file/d/1X09c3UUpl7g9MhyJOOwFrMzYMnA0eyx7/view?usp=sharingHuge thanks to all the contributors that enabled me to patch this together, and especially @dthian, @HedwigJDoets and @HedwigAR!