Can't get Firebase Crashlytics to work - not connecting to dashboard - ios

I cannot get Firebase crashlytics to work on iOS with swift. I have created a new app and a new Firebase project. (The app-server connection is succefull - I have checked it by creating a dummy firestore and read from it)
I have followed all the steps as detailed in the Firestore docs:
Added the Firebase/Crashlytics pod
Added the "${PODS_ROOT}/FirebaseCrashlytics/run" script in the project build phases
Selected the dwarf-with-dsym configuration
Forced a crash with fatalError
Run the app with no debugger attached
From the Firebase dashboard Crashlytics page I can only see the the rotating wheel and I do not get the successful installation.
This is XCode error stack when I launch the app:
2021-02-07 20:09:09.672258+0100 crashlyticsTest[43062:2323253] [Firebase/Crashlytics] Version 7.4.0
2021-02-07 20:09:09.874008+0100 crashlyticsTest[43062:2323510] [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed
2021-02-07 20:09:09.918388+0100 crashlyticsTest[43062:2323514] 7.4.0 - [Firebase/Crashlytics][I-CLS000000] Failed to remove file /Users/lucasfragara/Library/Developer/CoreSimulator/Devices/73D5BD20-51E0-4346-8474-375D5018108E/data/Containers/Data/Application/47F2BB34-CB6D-4E08-93B3-CCFC00788DA4/Library/Caches/com.crashlytics.data/com.sfra.crashlyticsTest/v5/reports/prepared/ad561f8c3ef74f6fb5cdf1eadb3bae7d: Error Domain=NSCocoaErrorDomain Code=4 "“ad561f8c3ef74f6fb5cdf1eadb3bae7d” couldn’t be removed." UserInfo={NSUserStringVariant=(
Remove
), NSFilePath=/Users/lucasfragara/Library/Developer/CoreSimulator/Devices/73D5BD20-51E0-4346-8474-375D5018108E/data/Containers/Data/Application/47F2BB34-CB6D-4E08-93B3-CCFC00788DA4/Library/Caches/com.crashlytics.data/com.sfra.crashlyticsTest/v5/reports/prepared/ad561f8c3ef74f6fb5cdf1eadb3bae7d, NSUnderlyingError=0x600002b294a0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
2021-02-07 20:09:09.918775+0100 crashlyticsTest[43062:2323514] 7.4.0 - [Firebase/Crashlytics][I-CLS000000] Unable to remove packaged submission
Fatal error: file crashlyticsTest/ViewController.swift, line 14
2021-02-07 20:09:09.926357+0100 crashlyticsTest[43062:2323253] Fatal error: file crashlyticsTest/ViewController.swift, line 14
(lldb)

Related

Appium Not Running Xcode 12.3

I'm trying to use Appium version 1.19.1 to test an ipad app on a physical ipad device that I have built with Xcode 12.3. Previously this has worked as expected, but recently I have not been able to get Appium to run at all, and I suspect that Xcode 12.3 may be the issue based on what I have discovered.
When I try to run Appium from python this is the trace printed to my python console (device serial number/udid intentionally hidden):
File "/Users/opt/anaconda3/lib/python3.7/site-packages/appium/webdriver/webdriver.py", line 155, in __init__
proxy
File "/Users/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "/Users/opt/anaconda3/lib/python3.7/site-packages/appium/webdriver/webdriver.py", line 225, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, parameters)
File "/Users/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/Users/opt/anaconda3/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
xcodebuild error message:
2021-01-06 17:04:24.366 xcodebuild[16217:213101] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 "The folder “WebDriverAgentRunner_iphoneos14.3-arm64.xctestrun” doesn’t exist." UserInfo={NSFilePath=/Users/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Build/Products/WebDriverAgentRunner_iphoneos14.3-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7fb116ac6ad0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
** TEST BUILD FAILED **
2021-01-06 17:04:24.380 xcodebuild[16217:213102] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.01.06_17-04-22--0600.xcresult/Staging/2_Test/Diagnostics/WebDriverAgentRunner-E1E91CAE-6813-4009-872F-D9B73C898BBD/WebDriverAgentRunner-0D722399-E7A6-4474-8791-593FA62358F6/Session-WebDriverAgentRunner-2021-01-06_170424-nMI8G0.log
2021-01-06 17:04:24.382 xcodebuild[16217:213028] [MT] IDETestOperationsObserverDebug: (DF79B2A2-04AF-4A59-87B7-DBB8279EC46E) Beginning test session WebDriverAgentRunner-DF79B2A2-04AF-4A59-87B7-DBB8279EC46E at 2021-01-06 17:04:24.381 with Xcode 12C33 on target 📱<DVTiOSDevice (0x7fb11a157e10), ****, iPad, 14.3 (18C66), ****> {
deviceSerialNumber: ****
identifier: ****
deviceClass: iPad
deviceName: ****
deviceIdentifier: ****
productVersion: 14.3
buildVersion: 18C66
deviceSoftwareVersion: 14.3 (18C66)
deviceArchitecture: arm64e
deviceTotalCapacity: 249024532480
deviceAvailableCapacity: 240144109568
deviceIsTransient: NO
ignored: NO
deviceIsBusy: NO
deviceIsPaired: YES
deviceIsActivated: YES
deviceActivationState: Activated
isPasscodeLocked: NO
deviceType: <DVTDeviceType:0x7fb113d0a3d0 Xcode.DeviceType.iPhone>
supportedDeviceFamilies: (
1,
2
)
applications: (null)
provisioningProfiles: (null)
hasInternalSupport: NO
hasWritableSystem: NO
isSupportedOS: YES
bootArgs: (null)
nextBootArgs: (null)
connected: YES
isWirelessEnabled: NO
connectionType: direct
hostname: (null)
bonjourServiceName: ****
activeProxiedDevice: (null)
} (14.3 (18C66))
2021-01-06 17:04:24.498 xcodebuild[16217:213028] [MT] IDETestOperationsObserverDebug: (****) Finished requesting crash reports. Continuing with testing.
*** If you believe this error represents a bug, please attach the result bundle at /Users/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.01.06_17-04-22--0600.xcresult
2021-01-06 17:04:24.514 xcodebuild[16217:213028] [MT] IDETestOperationsObserverDebug: 0.141 elapsed -- Testing started completed.
2021-01-06 17:04:24.514 xcodebuild[16217:213028] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2021-01-06 17:04:24.514 xcodebuild[16217:213028] [MT] IDETestOperationsObserverDebug: 0.141 sec, +0.141 sec -- end
Test session results, code coverage, and logs:
/Users/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.01.06_17-04-22--0600.xcresult
Testing failed:
Building for iOS, but the embedded framework 'CocoaAsyncSocket.framework' was built for iOS + iOS Simulator.
Building for iOS, but the embedded framework 'YYCache.framework' was built for iOS + iOS Simulator.
Building for iOS, but the linked and embedded framework 'CocoaAsyncSocket.framework' was built for iOS + iOS Simulator.
Building for iOS, but the linked and embedded framework 'YYCache.framework' was built for iOS + iOS Simulator.
WebDriverAgentRunner:
WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. If you believe this error represents a bug, please attach the result bundle at /Users/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.01.06_17-04-22--0600.xcresult. (Underlying Error: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. The file doesn’t exist. (Underlying Error: The operation couldn’t be completed. No such file or directory)))
** TEST EXECUTE FAILED **
Testing started. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
Through researching I came across this answer which linked to an apple developer forum post that leads me to believe the issue is with one of the frameworks that appium must be using that is not cooperating with Xcode 12.3.
I have also come across another suggestion that I tried but it did not fix my issue.
Also, this is what I'm seeing in Test-WebDriverAgentRunner-2021.01.06_17-04-19--0600.xcresult:
Assertions: System: Failed to install or launch the test runner. If you believe this error represents a bug, please attach the result bundle at /Users/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.01.06_17-04-19--0600.xcresult. (Underlying Error: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. The file doesn’t exist. (Underlying Error: The operation couldn’t be completed. No such file or directory))
So is there anything else I can try at this point, or is this going to come down to a framework being used by appium needing to be updated? Any ideas or suggestions are definitely appreciated!
Turns out I had to follow the suggestion in this answer but on the WebDriverAgent Xcode project. Seems to have fixed it for me.
After the installation WDA on real device, worked for me on appium 1.20 such workaround:
$ cd ~/Library/Developer/Xcode/DerivedData
$ rm -rf WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp
$ mv WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp

iOS React Native App/ Build Succeeded but App not getting open in iOS device/ Simulator

iOS App is build successfully but App is not getting open in the Simulator or device.
Getting chmod error for the app path.
Error:
info ** BUILD SUCCEEDED **
info Installing <PATH TO APP>.app
An error was encountered processing the command (domain=IXUserPresentableErrorDomain, code=1):
This app could not be installed at this time.
Could not install at this time.
Failed to chmod /Users/surabhiagrawal/Library/Developer/CoreSimulator/Devices/7A54A41E-006C-4B29-B33A-BE956F715255/data/Bundle/Application/0A68FDA4-1D57-49BB-8377-7BA5AC9BBB46/<AppName> : No such file or directory
Underlying error (domain=MIInstallerErrorDomain, code=4):
Failed to chmod /Users/surabhiagrawal/Library/Developer/CoreSimulator/Devices/7A54A41E-006C-4B29-B33A-BE956F715255/data/Bundle/Application/0A68FDA4-1D57-49BB-8377-7BA5AC9BBB46/<AppName>.app/<AppName> : No such file or directory
info Launching <Package Name>
com.goshopmatic.ShopmaticGoApp: -1
An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "App Package name" failed.
The request was denied by service delegate (SBMainWorkspace) for reason: NotFound ("Application <App_Path_Name> is unknown to FrontBoard").
Underlying error (domain=FBSOpenApplicationErrorDomain, code=4):
The operation couldn’t be completed. Application "App package name" is unknown to FrontBoard.
Application "App package name" is unknown to FrontBoard.
I fixed this by upgrading XCode.

Firebase analytics gets disabled when updating firebase sdk to 6.2.0 or higher

Firebase Analytics stops working when updating the Firebase Core iOS SDK to 6.2.0 or higher versions.
Works fine if the version is 6.1.0 or lower.
[FIRApp configure];
Gets the following logs in console
6.10.0 - [Firebase/Analytics][I-ACS034002] Failed to recreate database file. Error: Error Domain=com.google.gmp.measurement.ErrorDomain Code=3 "Database operation "prepare statement" failed with sqlite code 0 and error message "not an error"" UserInfo={NSLocalizedDescription=Database operation "prepare statement" failed with sqlite code 0 and error message "not an error", APMMonitorContext=prepare statement,0,A,3}
6.10.0 - [Firebase/Analytics][I-ACS012001] Failed to open database (Init)
6.10.0 - [Firebase/Analytics][I-ACS034002] Failed to recreate database file. Error: Error Domain=com.google.gmp.measurement.ErrorDomain Code=3 "Database operation "prepare statement" failed with sqlite code 0 and error message "not an error"" UserInfo={NSLocalizedDescription=Database operation "prepare statement" failed with sqlite code 0 and error message "not an error", APMMonitorContext=prepare statement,0,A,3}
6.10.0 - [Firebase/Analytics][I-ACS012001] Failed to open database (Init)
6.10.0 - [Firebase/Analytics][I-ACS023011] Failed to start Analytics. Analytics is disabled

Xcode executes successful build but is unable to launch on a physical device

I'm having this exact same issue:
https://github.com/facebook/react-native/issues/26152
This is on react-native 0.60.4
I'm able to have a successful build in Xcode, but I'm not able launch the app on a physical device.
This is the error that I'm given:
This is the readout from the console:
Details
Unable to launch com.news.arg
Domain: com.apple.platform.iphoneos
Code: -12
--
Request to launch com.news.arg failed.
Domain: com.apple.dt.deviceprocesscontrolservice
Code: 2
Failure Reason: The operation couldn’t be completed. Application "com.news.arg" is unknown to FrontBoard. : Failed to launch process with bundle identifier 'com.news.arg'.
--
The operation couldn’t be completed. Application "com.news.arg" is unknown to FrontBoard.
Domain: FBSOpenApplicationErrorDomain
Code: 4
Failure Reason: Application "com.news.arg" is unknown to FrontBoard.
User Info: {
BSErrorCodeDescription = NotFound;
}
--
Someone said on the react native reddit that expo posted a workaround on their twitter, but we were unable to find it when we went back and looked.

Swift Realm Simulator Permission Denied

I have been using RealmSwift for a while with no issues. However I have just started to get the following error when running Simulator with a Realm Swift Project
xcode: 8.2.1 (I am on El Capitain so this is the latest I can go)
RealmSwift: 3.0.2
Swift: 3.0.2.
Error: Domain=io.realm.unknown Code=13 "Permission denied"
file:///Users/michaelmoulsdale/Library/Developer/CoreSimulator/Devices/B83BA287-5365-4048-A813-042D63A194A6/data/Containers/Data/Application/78F3500D-975E-4A60-A674-203325588F3F/Documents/default.realm
fatal error: 'try!' expression unexpectedly raised an error: Error
Domain=io.realm.unknown Code=13 "Permission denied"
UserInfo={Category=system, Error Code=13,
NSLocalizedDescription=Permission denied}: file
/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-800.0.63/src/swift/stdlib/public/core/ErrorType.swift,
line 178
I have tried the following things
update Cocoa Pods for RealmSwift
I am in the progressing of re-installing Xcode from the developer downloads.
Any other thoughts?
I finally deleted the CoreSimulator directory (file:///Users/michaelmoulsdale/Library/Developer/CoreSimulator/Devices)
When I ran the next simulation, this directory was recreated and all was well.
Odd little behaviour, no idea what caused it.

Resources