Appium ios - Unknown device or simulator UDID - appium-ios

I am facing the following issue while running test-script on real device(iPhone 7).
After saw that log, I try to solve this issue, but I stuck here (Check the screenshot)
Environment -
Appium - 1.8.0-beta3
Device - iphone 7 (OS - 10.3.1)
mac OS - 10.13.2
Appium Log -
[Appium] Welcome to Appium v1.8.0-beta3
[Appium] Non-default server args:
[Appium] port: 5488
[Appium] Appium REST http interface listener started on 0.0.0.0:5488
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.8.0-beta3","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 23 ms - 78
Attempt[1] to start appium server
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.8.0-beta3","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 15 ms - 78
[HTTP] --> GET /wd/hub/status {}
[debug] [MJSONWP] Calling AppiumDriver.getStatus() with args: []
[debug] [MJSONWP] Responding to client with driver.getStatus() result: {"build":{"version":"1.8.0-beta3","revision":null}}
[HTTP] <-- GET /wd/hub/status 200 15 ms - 78
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"noReset":false,"clearSystemFiles":true,"newCommandTimeout":1200,"platformVersion":"10.3.1","automationName":"XCuiTest","bundleId":"--------","udid":"457187374caf18----------------------------------","platformName":"iOS","deviceName":"iOS"},"requiredCapabilities":{},"capabilities":{"desiredCapabilities":{"noReset":false,"clearSystemFiles":true,"newCommandTimeout":1200,"platformVersion":"10.3.1","automationName":"XCuiTest","bundleId":"-----------","udid":"457187374caf18----------------------------------","platformName":"iOS","deviceName":"iOS"},"requiredCapabilities":{},"alwaysMatch":{"platformName":"iOS"},"firstMatch":[]}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"noReset":false,"clearSystemFiles":true,"newCommandTimeout":1200,"platformVersion":"10.3.1","automationName":"XCuiTest","bundleId":"-----------","udid":"457187374caf18----------------------------------","platformName":"iOS","deviceName":"iOS"},{},{"desiredCapabilities":{"noReset":false,"clearSystemFiles":true,"newCommandTimeout":1200,"platformVersion":"10.3.1","automationName":"XCuiTest","bundleId":"-----------","udid":"457187374caf18----------------------------------","platformName":"iOS","deviceName":"iOS"},"requiredCapabilities":{},"alwaysMatch":{"platformName":"iOS"},"firstMatch":[]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1519049570375 (19:42:50 GMT+0530 (IST))
[Appium] Could not parse W3C capabilities: 'deviceName' can't be blank. Falling back to JSONWP protocol.
[Appium] Creating new XCUITestDriver (v2.68.0) session
[Appium] Capabilities:
[Appium] noReset: false
[Appium] clearSystemFiles: true
[Appium] newCommandTimeout: 1200
[Appium] platformVersion: 10.3.1
[Appium] automationName: XCuiTest
[Appium] bundleId: -----------
[Appium] udid: 457187374caf18----------------------------------
[Appium] platformName: iOS
[Appium] deviceName: iOS
[debug] [BaseDriver]
[debug] [BaseDriver] Creating session with MJSONWP desired capabilities: {"noReset":false,"clearSyst...
[BaseDriver] Session created with session id: 431df073-2efd-4f7f-b9c6-9868cc1d87d6
[debug] [XCUITest] Current user: 'test'
[debug] [XCUITest] Xcode version set to '9.2'
[debug] [XCUITest] iOS SDK Version set to '11.2'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1519049570723 (19:42:50 GMT+0530 (IST))
[XCUITest] The 'idevice_id' program is not installed. If you are running a real device test it is necessary. Install with 'brew install libimobiledevice --HEAD'
[debug] [XCUITest] Available devices:
[XCUITest] Error: Unknown device or simulator UDID: '457187374caf18----------------------------------'

On terminal run these commands
brew uninstall ideviceinstaller
brew uninstall --ignore-dependencies libimobiledevice
brew install --HEAD libimobiledevice
brew unlink libimobiledevice && brew link libimobiledevice
brew install --HEAD ideviceinstaller
brew unlink ideviceinstaller && brew link ideviceinstaller

Related

trying to host my website on firebase gives error - An unexpected error has occured - Error log files included

I tried this command to host my app on firebase :
node_modules/.bin/firebase deploy --only hosting
And i get this error : "Error: An unexpected error has occurred"
These are the log files :
[error] Error: An unexpected error has occurred.
[debug] [2023-02-06T11:29:18.454Z] ----------------------------------------------------------------------
[debug] [2023-02-06T11:29:18.456Z] Command: D:\Program Files (x86)\node.exe C:\Users\JustDankas\Desktop\NextJS\books-app\node_modules\firebase-tools\lib\bin\firebase.js deploy --only hosting
[debug] [2023-02-06T11:29:18.456Z] CLI Version: 11.22.0
[debug] [2023-02-06T11:29:18.456Z] Platform: win32
[debug] [2023-02-06T11:29:18.457Z] Node Version: v17.8.0
[debug] [2023-02-06T11:29:18.458Z] Time: Mon Feb 06 2023 13:29:18 GMT+0200 (Eastern European Standard Time)
[debug] [2023-02-06T11:29:18.458Z] ----------------------------------------------------------------------
[debug]
[debug] [2023-02-06T11:29:18.539Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2023-02-06T11:29:18.540Z] > authorizing via signed-in user
[debug] [2023-02-06T11:29:18.540Z] [iam] checking project my-example-project for permissions ["firebase.projects.get","firebasehosting.sites.update"]
[debug] [2023-02-06T11:29:18.543Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-example-project:testIamPermissions [none]
[debug] [2023-02-06T11:29:18.543Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-example-project:testIamPermissions x-goog-quota-user=projects/example
[debug] [2023-02-06T11:29:18.543Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-example-project:testIamPermissions {"permissions":["firebase.projects.get","firebasehosting.sites.update"]}
[debug] [2023-02-06T11:29:19.588Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-example-project:testIamPermissions 200
[debug] [2023-02-06T11:29:19.589Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/my-example-project:testIamPermissions {"permissions":["firebase.projects.get","firebasehosting.sites.update"]}
[debug] [2023-02-06T11:29:19.590Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/my-example-project [none]
[debug] [2023-02-06T11:29:20.083Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/my-example-project 200
[debug] [2023-02-06T11:29:20.083Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/my-example-project {"projectId":"my-example-project","projectNumber":"xxxxxxxxxxx","displayName":"Books-app","name":"projects/my-example-project","resources":{"hostingSite":"my-example-project","storageBucket":"my-example-project.appspot.com","locationId":"europe-west"},"state":"ACTIVE","etag":"adsaas"}
[debug] [2023-02-06T11:29:42.446Z] TypeError: Cannot read properties of null (reading 'toString')
at ɵcodegenFunctionsDirectory (C:\Users\JustDankas\Desktop\NextJS\books-app\node_modules\firebase-tools\lib\frameworks\next\index.js:222:18)
at async prepareFrameworks (C:\Users\JustDankas\Desktop\NextJS\books-app\node_modules\firebase-tools\lib\frameworks\index.js:306:84)
at async deploy (C:\Users\JustDankas\Desktop\NextJS\books-app\node_modules\firebase-tools\lib\deploy\index.js:53:13)
[error]
[error] Error: An unexpected error has occurred.
it builds fine locally , also firebase emulator hosts it properly on my local machine, but actual hosting don't work.
Tried to find toString() in my code, didn't find any, prob its not that

Firebase crashlytics mapping file is not uploading on a Ubuntu AWS container

I recently migrated to firebase-crashlytics-gradle from the deprecated Fabric library. It works properly on the local machine with these commands:
chmod +x ./gradlew
./gradlew clean
./gradlew assembleApplicationQa appDistributionUploadApplicationQa --debug
however, this is not working on the ubuntu container in the code build pipeline on AWS. The error that is showing is this one:
* What went wrong:
00:32:26.407 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution
failed for task ':app:uploadCrashlyticsMappingFileApplicationQa'.
00:32:26.407 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] >
java.io.FileNotFoundException:
/codebuild/output/src160981101/src/application/app/build/outputs/mapping/application/qa/mapping.txt
(No such file or directory)
00:32:26.407 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
I found that on the local there is a process in that task that is not happening con the ubuntu container: that is this one which seems like is reaching the Crashlytics server and uploads the file properly:
18:58:46.217 [DEBUG] [com.google.firebase.crashlytics] Uploading Mapping File [mappingFile: /Users/carlos/Desktop/Repo/Applicationandroid/Application/app/build/outputs/mapping/Application/qa/mapping.txt; mappingFileId: 764dc9b417f249f08823552e8e240186;packageName: com.Application.android.qa; googleAppId: 1:775166595613:android:604478ccade98840]
18:58:46.218 [DEBUG] [com.google.firebase.crashlytics] Zipping mapping file: /Users/carlos/Desktop/Repo/Applicationandroid/Application/app/build/outputs/mapping/Application/qa/mapping.txt -> /Users/carlos/Desktop/Repo/Applicationandroid/Application/app/build/crashlytics/ApplicationQa/mappings/764dc9b417f249f08823552e8e240186.gz
18:58:46.697 [DEBUG] [com.google.firebase.crashlytics] PUT file: /Users/carlos/Desktop/Repo/Applicationandroid/Application/app/build/crashlytics/ApplicationQa/mappings/764dc9b417f249f08823552e8e240186.gz to URL: https://firebasecrashlyticssymbols.googleapis.com/v1/project/-/app/1:775166595613:android:604478ccade98840/upload/java/764dc9b417f249f08823552e8e240186
18:58:46.698 [DEBUG] [com.google.firebase.crashlytics] PUT headers:
18:58:46.698 [DEBUG] [com.google.firebase.crashlytics] User-Agent = crashlytics-gradle/2.0.0
18:58:46.698 [DEBUG] [com.google.firebase.crashlytics] X-CRASHLYTICS-API-CLIENT-TYPE = crashlytics-gradle
18:58:46.698 [DEBUG] [com.google.firebase.crashlytics] X-CRASHLYTICS-API-CLIENT-VERSION = 2.0.0
18:58:46.698 [DEBUG] [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: default
18:58:46.698 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth cache not set in the context
18:58:46.699 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection request: [route: {s}->https://firebasecrashlyticssymbols.googleapis.com:443][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
18:58:46.699 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection leased: [id: 8][route: {s}->https://firebasecrashlyticssymbols.googleapis.com:443][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
18:58:46.699 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Opening connection {s}->https://firebasecrashlyticssymbols.googleapis.com:443
18:58:46.759 [DEBUG] [org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connecting to firebasecrashlyticssymbols.googleapis.com/142.250.113.95:443
18:58:46.759 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Connecting socket to firebasecrashlyticssymbols.googleapis.com/142.250.113.95:443 with timeout 0
18:58:46.811 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Enabled protocols: [TLSv1.2, TLSv1.1, TLSv1]
18:58:46.811 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
18:58:46.811 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Starting handshake
18:58:46.870 [DEBUG] [jdk.event.security] ValidationChain: 7087067, 1544128074,234213421
18:58:46.925 [DEBUG] [jdk.event.security] TLSHandshake: firebasecrashlyticssymbols.googleapis.com:443, TLSv1.2, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 1528437816
18:58:46.925 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] Secure session established
18:58:46.925 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] negotiated protocol: TLSv1.2
18:58:46.925 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] negotiated cipher suite: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
18:58:46.926 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] peer principal: CN=upload.video.google.com, O=Google LLC, L=Mountain View, ST=California, C=US
18:58:46.926 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] peer alternative names: [upload.video.google.com, *.clients.google.com, *.docs.google.com, *.drive.google.com, *.gdata.youtube.com, *.googleapis.com, *.photos.google.com, *.upload.google.com, *.upload.youtube.com, *.youtube-3rd-party.com, upload.google.com, upload.youtube.com, uploads.stage.gdata.youtube.com]
18:58:46.926 [DEBUG] [org.apache.http.conn.ssl.SSLConnectionSocketFactory] issuer principal: CN=GTS CA 1O1, O=Google Trust Services, C=US
18:58:46.926 [DEBUG] [org.apache.http.impl.conn.DefaultHttpClientConnectionOperator] Connection established 192.168.0.9:61946<->142.250.113.95:443
18:58:46.926 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Executing request PUT /v1/project/-/app/1:775166595613:android:604478ccade98840/upload/java/764dc9b417f249f08823552e8e240186 HTTP/1.1
18:58:46.926 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Target auth state: UNCHALLENGED
18:58:46.926 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Proxy auth state: UNCHALLENGED
18:58:51.688 [LIFECYCLE] [org.gradle.process.internal.health.memory.MemoryManager]
18:58:51.688 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting OS memory status event {Total: 17179869184, Free: 6186242048}
18:58:51.688 [DEBUG] [org.gradle.launcher.daemon.server.health.LowMemoryDaemonExpirationStrategy] Received memory status update: {Total: 17179869184, Free: 6186242048}
18:58:51.688 [DEBUG] [org.gradle.process.internal.health.memory.MemoryManager] Emitting JVM memory status event {Maximum: 3817865216, Committed: 3571974144}
18:58:48.233 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger]
18:58:48.233 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :app:uploadCrashlyticsMappingFileAppicationQa
18:58:53.416 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Connection can be kept alive indefinitely
18:58:53.416 [DEBUG] [com.google.firebase.crashlytics] PUT response: [reqId=null] 200
18:58:53.416 [INFO] [com.google.firebase.crashlytics] Mapping file uploaded: /Users/hernandez/Desktop/Repo/Appicationandroid/Appication/app/build/outputs/mapping/Appication/qa/mapping.txt
18:58:53.416 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute uploadMappingFile for :app:uploadCrashlyticsMappingFileApplicationQa'
18:58:53.417 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute uploadMappingFile for :app:uploadCrashlyticsMappingFileApplicationQa' completed
18:58:53.417 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
18:58:53.417 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':app:uploadCrashlyticsMappingFileApplicationQa'
18:58:53.417 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Task :app:uploadCrashlyticsMappingFileApplicationQa'
18:58:53.417 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :app:uploadCrashlyticsMappingFileApplicationQa' completed
18:58:53.417 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :app:uploadCrashlyticsMappingFileApplicationQa (Thread[Task worker for ':',5,main]) completed. Took 7.201 secs.
':': acquired lock on root.1.26
As you can see the process uploads the file and then completes, however in the ubuntu container it doesn't happen:
00:32:25.697 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :app:uploadCrashlyticsMappingFileApplicationQa (Thread[Task worker for ':' Thread 7,5,main]) started.
00:32:25.697 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger]
00:32:25.697 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :app:uploadCrashlyticsMappingFileApplicationQa FAILED
00:32:25.697 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :app:uploadCrashlyticsMappingFileApplicationQa' started
00:32:25.697 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':app:uploadCrashlyticsMappingFileApplicationQa'
00:32:25.697 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Putting task artifact state for task ':app:uploadCrashlyticsMappingFileApplicationQa' into context took 0.0 secs.
00:32:25.697 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':app:uploadCrashlyticsMappingFileApplicationQa' is up-to-date
00:32:25.697 [INFO] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Task ':app:uploadCrashlyticsMappingFileApplicationQa' is not up-to-date because:
Task has not declared any outputs despite executing actions.
00:32:25.697 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':app:uploadCrashlyticsMappingFileApplicationQa'.
00:32:25.697 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute uploadMappingFile for :app:uploadCrashlyticsMappingFileApplicationQa' started
00:32:25.701 [DEBUG] [com.google.firebase.crashlytics] Getting appId from output of the Google Services plugin at /codebuild/output/src160981101/src/Application/app/build/generated/res/google-services/Application/qa/values/values.xml
00:32:25.733 [DEBUG] [com.google.firebase.crashlytics] Found Google appId: 1:775166595613:android:604478ccade232432
00:32:25.741 [DEBUG] [com.google.firebase.crashlytics] Uploading Mapping File [mappingFile: /codebuild/output/src160981101/src/Application/app/build/outputs/mapping/Application/qa/mapping.txt; mappingFileId: 140f7e5865d146cdb1c49d4eae9d82b7;packageName: com.Application.android.qa; googleAppId: 1:775166595613:android:604478ccade232432]
00:32:25.742 [DEBUG] [com.google.firebase.crashlytics] Zipping mapping file: /codebuild/output/src160981101/src/Application/app/build/outputs/mapping/Application/qa/mapping.txt -> /codebuild/output/src160981101/src/Application/app/build/crashlytics/ApplicationQa/mappings/140f7e5865d146cdb1c49d4eae9d82b7.gz
00:32:25.742 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute uploadMappingFile for :app:uploadCrashlyticsMappingFileApplicationQa'
00:32:25.742 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute uploadMappingFile for :app:uploadCrashlyticsMappingFileApplicationQa' completed
00:32:25.743 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
00:32:25.743 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':app:uploadCrashlyticsMappingFileApplicationQa'
00:32:25.743 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Task :app:uploadCrashlyticsMappingFileApplicationQa'
00:32:25.743 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :app:uploadCrashlyticsMappingFileApplicationQa' completed
00:32:25.743 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :app:uploadCrashlyticsMappingFileApplicationQa (Thread[Task worker for ':' Thread 7,5,main]) completed. Took 0.045 secs.
So I really don't know what if going on, but this is breaking the pipeline because is not compiling, if I set the flag on the Gradle file of mappingFileUploadEnabled to false:
mappingFileUploadEnabled false
the project is compiling successfully but, when it is set to true it is not.
So seems like the problem is firebase is not reaching its server but I don't know why, the container doesn't have any IP restriction to firebase
Thank you for your help I really appreciate it!
After several days of doing this, I discovered that the problem is related to Crashlytics and the Gradle version if you use this configuration:
Docker Image for building the project: standard/ubuntu4:0 from this place
Gradle version: 4.10.3 and android Gradle plugin 3.3.3
Any version of Crashlytics from 17.0.0 and up
Progurad must be enabled and the flag to upload the mapping file to Crashlycts must be true
Then run the project and the project will crash.
The solution is to upgrade the Gradle version to 5.1.1 and the project will run properly, a code example is here
You can see through the comments, how the project evolved.

Firebase cli throws Error: Server Error. connect ETIMEDOUT on every command

I checked all the answers to this question on stack overflow. But all of them occurred due to some other reasons.
Well,
I was trying to deploy some database rules and started getting this error. And later on when i tried to do anything i realized that none of the firebase commands work and throws the same error again and again.
what all i tried :
updates firebase tools to latest version
reset my internet connection
firebase login --reauth
but no luck.
here are the logs
[debug] [2018-12-25T05:41:52.644Z] ----------------------------------------------------------------------
[debug] [2018-12-25T05:41:52.648Z] Command: C:\Program Files\nodejs\node.exe C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js list
[debug] [2018-12-25T05:41:52.649Z] CLI Version: 6.2.2
[debug] [2018-12-25T05:41:52.649Z] Platform: win32
[debug] [2018-12-25T05:41:52.649Z] Node Version: v8.12.0
[debug] [2018-12-25T05:41:52.650Z] Time: Tue Dec 25 2018 11:11:52 GMT+0530 (India Standard Time)
[debug] [2018-12-25T05:41:52.650Z] ----------------------------------------------------------------------
[debug]
[debug] [2018-12-25T05:41:52.673Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2018-12-25T05:41:52.674Z] > authorizing via signed-in user
[debug] [2018-12-25T05:41:52.677Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[debug] [2018-12-25T05:41:52.678Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token
<request body omitted>
[debug] [2018-12-25T05:41:53.273Z] <<< HTTP RESPONSE 200
[debug] [2018-12-25T05:41:53.336Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects
[debug] [2018-12-25T05:42:14.888Z] Error: connect ETIMEDOUT 104.197.85.31:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)
[error]
[error] Error: Server Error. connect ETIMEDOUT 104.197.85.31:443
Please suggest whatever you know about the issue.
npm i -g firebase-tools
Updating firebase tools worked for me.
then, try again firebase deploy.
if it still didn't work try clearing the firebase cache which is the .firebase file

Firebase Deploy "An unexpected error has occurred"

Trying to deploy a new site to Firebase (as I've done a dozen times, though haven't for a few months). Everything is going fine, but then when I get to "Firebase Deploy", I get "Error: An unexpected error has occurred". I've tried the suggestions given where a similar question was asked earlier ("An unexpected error has occurred" after firebase deploy) but none of them have done any good (keep getting the same error). Firebase is updated. Running on a Linux 64-bit (if it matters). I ran a debug on the deploy, and got the following log:
[debug] [2018-12-11T21:45:26.441Z] ----------------------------------------------------------------------
[debug] [2018-12-11T21:45:26.443Z] Command: /home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/node/bin/node /home/myName/.nvm/versions/node/v8.9.4/bin/firebase deploy
[debug] [2018-12-11T21:45:26.443Z] CLI Version: 3.18.5
[debug] [2018-12-11T21:45:26.443Z] Platform: linux
[debug] [2018-12-11T21:45:26.443Z] Node Version: v10.3.0
[debug] [2018-12-11T21:45:26.443Z] Time: Tue Dec 11 2018 14:45:26 GMT-0700 (MST)
[debug] [2018-12-11T21:45:26.443Z] ----------------------------------------------------------------------
[debug]
[debug] [2018-12-11T21:45:26.448Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2018-12-11T21:45:26.448Z] > authorizing via signed-in user
[debug] [2018-12-11T21:45:26.449Z] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloud-platform","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","open
[debug] [2018-12-11T21:45:26.450Z] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token
{ refresh_token: '1/9RM51tbmmz5VrjkpAxad-5CElD29bDNC-Dyu-L6-9hw',
client_id:
'563584335869-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com',
client_secret: 'j9iVZfS8kkCEFUPaAeJV0sAi',
grant_type: 'refresh_token',
scope:
'email https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/firebase openid' }
Tue Dec 11 2018 14:45:26 GMT-0700 (MST)
[debug] [2018-12-11T21:45:26.674Z] <<< HTTP RESPONSE 200
[debug] [2018-12-11T21:45:27.581Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/my-home-page-ed336
Tue Dec 11 2018 14:45:27 GMT-0700 (MST)
[debug] [2018-12-11T21:45:27.871Z] <<< HTTP RESPONSE 200
[debug] [2018-12-11T21:45:27.873Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/my-home-page-ed336/tokens
Tue Dec 11 2018 14:45:27 GMT-0700 (MST)
[debug] [2018-12-11T21:45:28.270Z] <<< HTTP RESPONSE 200
[info]
[info] === Deploying to 'my-home-page-ed336'...
[info]
[info] i deploying hosting
[info] i hosting: preparing . directory for upload...
[debug] [2018-12-11T21:45:28.733Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/my-home-page-ed336/uploads/-LTUDqAhHObNxZ0HsRuG?fileCount=114&message=
Tue Dec 11 2018 14:45:28 GMT-0700 (MST)
[debug] [2018-12-11T21:45:36.863Z] <<< HTTP RESPONSE 410
[debug] [2018-12-11T21:45:36.864Z] <<< HTTP RESPONSE BODY undefined
[debug] [2018-12-11T21:45:36.867Z] TypeError: Cannot read property 'error' of undefined
at module.exports (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/lib/responseToError.js:10:13)
at Request._callback (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/lib/api.js:47:25)
at Request.self.callback (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/node_modules/request/request.js:185:22)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:442:20)
at Request.<anonymous> (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/node_modules/request/request.js:1157:10)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:442:20)
at IncomingMessage.<anonymous> (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/node_modules/request/request.js:1079:12)
at Object.onceWrapper (events.js:273:13)
[error]
[error] Error: An unexpected error has occurred.
[debug] [2018-12-11T21:45:49.697Z] ----------------------------------------------------------------------
[debug] [2018-12-11T21:45:49.699Z] Command: /home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/node/bin/node /home/myName/.nvm/versions/node/v8.9.4/bin/firebase deploy --debug
[debug] [2018-12-11T21:45:49.700Z] CLI Version: 3.18.5
[debug] [2018-12-11T21:45:49.700Z] Platform: linux
[debug] [2018-12-11T21:45:49.700Z] Node Version: v10.3.0
[debug] [2018-12-11T21:45:49.700Z] Time: Tue Dec 11 2018 14:45:49 GMT-0700 (MST)
[debug] [2018-12-11T21:45:49.700Z] ----------------------------------------------------------------------
[debug]
[debug] [2018-12-11T21:45:49.705Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2018-12-11T21:45:49.705Z] > authorizing via signed-in user
[debug] [2018-12-11T21:45:49.707Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects/my-home-page-ed336
Tue Dec 11 2018 14:45:49 GMT-0700 (MST)
[debug] [2018-12-11T21:45:50.018Z] <<< HTTP RESPONSE 200
[debug] [2018-12-11T21:45:50.021Z] >>> HTTP REQUEST GET https://admin.firebase.com/v1/database/my-home-page-ed336/tokens
Tue Dec 11 2018 14:45:50 GMT-0700 (MST)
[debug] [2018-12-11T21:45:50.315Z] <<< HTTP RESPONSE 200
[info]
[info] === Deploying to 'my-home-page-ed336'...
[info]
[info] i deploying hosting
[info] i hosting: preparing . directory for upload...
[debug] [2018-12-11T21:45:50.768Z] >>> HTTP REQUEST PUT https://deploy.firebase.com/v1/hosting/my-home-page-ed336/uploads/-LTUDvYyTmVMnTOVgYO3?fileCount=114&message=
Tue Dec 11 2018 14:45:50 GMT-0700 (MST)
[debug] [2018-12-11T21:45:57.867Z] <<< HTTP RESPONSE 410
[debug] [2018-12-11T21:45:57.868Z] <<< HTTP RESPONSE BODY undefined
[debug] [2018-12-11T21:45:57.871Z] TypeError: Cannot read property 'error' of undefined
at module.exports (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/lib/responseToError.js:10:13)
at Request._callback (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/lib/api.js:47:25)
at Request.self.callback (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/node_modules/request/request.js:185:22)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:442:20)
at Request.<anonymous> (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/node_modules/request/request.js:1157:10)
at Request.emit (events.js:182:13)
at Request.EventEmitter.emit (domain.js:442:20)
at IncomingMessage.<anonymous> (/home/myName/.nvm/versions/node/v8.9.4/lib/node_modules/firebase-tools/node_modules/request/request.js:1079:12)
at Object.onceWrapper (events.js:273:13)
[error]
[error] Error: An unexpected error has occurred.
Thanks for everyone's help!
Your Firebase CLI is very old. Update it with npm install -g firebase-tools. Latest version at this moment is 6.1.2.
update your firebase CLI with this command
npm install -g firebase-tools
then initialize your firebase with
firebase init
Now its time to deploy the project
firebase deploy

firebase init gives EPROTO error

Running firebase init command gives an EPROTO error. Same error when I try firebase list. I can successfully use firebase login though. Here is the output of the firebase.debug.log:
[debug] ----------------------------------------------------------------------
[debug] Command: C:\Program Files\nodejs\node.exe C:\Users\andre\AppData\Roaming\npm\node_modules\firebase-tools\bin\firebase init
[debug] CLI Version: 3.13.1
[debug] Platform: win32
[debug] Node Version: v8.8.1
[debug] Time: Sat Oct 28 2017 12:35:18 GMT+0100 (GMT Summer Time)
[debug] ----------------------------------------------------------------------
[debug]
[debug] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase"]
[debug] [2017-10-28T11:35:18.899Z] > authorizing via signed-in user
You're about to initialize a Firebase project in this directory:
C:\Users\andre\Documents\cake-poly20-test
[info]
=== Project Setup
[info]
[info] First, let's associate this project directory with a Firebase project.
[info] You can create multiple project aliases by running firebase use --add,
[info] but for now we'll just set up a default project.
[info]
[debug] > refreshing access token with scopes: ["email","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","openid"]
[debug] >>> HTTP REQUEST POST https://www.googleapis.com/oauth2/v3/token { refresh_token: '<token>',
client_id: '<clientid>.apps.googleusercontent.com',
client_secret: '<secret>',
grant_type: 'refresh_token',
scope: 'email https://www.googleapis.com/auth/cloudplatformprojects.readonly https://www.googleapis.com/auth/firebase openid' }
Sat Oct 28 2017 12:35:25 GMT+0100 (GMT Summer Time)
[debug] <<< HTTP RESPONSE 200
[debug] >>> HTTP REQUEST GET https://admin.firebase.com/v1/projects
Sat Oct 28 2017 12:35:25 GMT+0100 (GMT Summer Time)
[debug] Error: write EPROTO 101057795:error:140773E8:SSL routines:SSL23_GET_SERVER_HELLO:reason(1000):openssl\ssl\s23_clnt.c:772:
at _errnoException (util.js:1024:11)
at WriteWrap.afterWrite [as oncomplete] (net.js:870:14)
[error]
[error] Error: Server Error. write EPROTO 101057795:error:140773E8:SSL routines:SSL23_GET_SERVER_HELLO:reason(1000):openssl\ssl\s23_clnt.c:772:
Cause:
Eventually I found that my ISP had updated its so-called Kids Safe security settings and was treating admin.firebase.com as a blocked file sharing site.
Solution:
I updated my settings in the ISPs config, so that access to firebase.com was always allowed. Now firebase init, firebase list etc are working fine.

Resources