Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[!] 'bucket_url' value must be a String! Found File instead. #26

Open
YassinELhadedy opened this issue Sep 1, 2021 · 3 comments
Open
Labels
help wanted Need help? We will do our best to help you.

Comments

@YassinELhadedy
Copy link

when I run command to integrate Fastlane with firebase test lab: Fastlane instrumentation_tests_testlab

this error shows:
fastlane finished with errors

[!] 'bucket_url' value must be a String! Found File instead.

trace log:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
#!/bin/bash -eo pipefail
bundle exec fastlane instrumentation_tests_testlab
[⠋] 🚀 [⠙] 🚀 [⠹] 🚀 [⠸] 🚀 [⠼] 🚀 [⠴] 🚀 [⠦] 🚀 [✔] 🚀
+---------------------------------------------+---------+-----------------------------+
| Used plugins |
+---------------------------------------------+---------+-----------------------------+
| Plugin | Version | Action |
+---------------------------------------------+---------+-----------------------------+
| fastlane-plugin-automated_test_emulator_run | 1.6.0 | automated_test_emulator_run |
| fastlane-plugin-run_tests_firebase_testlab | 0.3.1 | run_tests_firebase_testlab |
+---------------------------------------------+---------+-----------------------------+

[21:24:09]: Sending anonymous analytics information
[21:24:09]: Learn more at https://docs.fastlane.tools/#metrics
[21:24:09]: No personal or sensitive data is sent.
[21:24:09]: You can disable this by adding opt_out_usage at the top of your Fastfile
[21:24:09]: ------------------------------
[21:24:09]: --- Step: default_platform ---
[21:24:09]: ------------------------------
[21:24:09]: Driving the lane 'android instrumentation_tests_testlab' 🚀
[21:24:09]: ---------------------------------------------
[21:24:09]: --- Step: Switch to android assemble lane ---
[21:24:09]: ---------------------------------------------
[21:24:09]: Cruising over to lane 'android assemble' 🚖
[21:24:09]: ---------------------------------------------------
[21:24:09]: --- Step: Switch to android assemble_build lane ---
[21:24:09]: ---------------------------------------------------
[21:24:09]: Cruising over to lane 'android assemble_build' 🚖
[21:24:09]: ---------------------------
[21:24:09]: --- Step: assembleDebug ---
[21:24:09]: ---------------------------
[21:24:09]: $ /home/circleci/src/gradlew assembleDebug -p .
[21:24:09]: ▸ Picked up _JAVA_OPTIONS: -Xmx3200m
[21:24:10]: ▸ > Configure project :app
[21:24:10]: ▸ WARNING:API 'BaseVariant.getApplicationIdTextResource' is obsolete and has been replaced with 'VariantProperties.applicationId'.
[21:24:10]: ▸ It will be removed in version 7.0 of the Android Gradle plugin.
[21:24:10]: ▸ For more information, see TBD.
[21:24:10]: ▸ To determine what is calling BaseVariant.getApplicationIdTextResource, use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
[21:24:11]: ▸ > Task :app:preBuild UP-TO-DATE
[21:24:11]: ▸ > Task :app:preDebugBuild UP-TO-DATE
[21:24:11]: ▸ > Task :app:compileDebugAidl NO-SOURCE
[21:24:11]: ▸ > Task :app:compileDebugRenderscript NO-SOURCE
[21:24:12]: ▸ > Task :app:dataBindingMergeDependencyArtifactsDebug
[21:24:12]: ▸ > Task :app:dataBindingMergeGenClassesDebug
[21:24:12]: ▸ > Task :app:generateDebugResValues
[21:24:12]: ▸ > Task :app:generateDebugResources
[21:24:12]: ▸ > Task :app:processDebugGoogleServices
[21:24:14]: ▸ > Task :app:dataBindingTriggerDebug
[21:24:14]: ▸ > Task :app:generateDebugBuildConfig
[21:24:14]: ▸ > Task :app:writeDebugApplicationId
[21:24:14]: ▸ > Task :app:generateSafeArgsDebug
[21:24:14]: ▸ > Task :app:checkDebugAarMetadata
[21:24:14]: ▸ > Task :app:createDebugCompatibleScreenManifests
[21:24:14]: ▸ > Task :app:mergeDebugResources
[21:24:14]: ▸ > Task :app:extractDeepLinksDebug
[21:24:14]: ▸ > Task :app:dataBindingGenBaseClassesDebug
[21:24:15]: ▸ > Task :app:processDebugMainManifest
[21:24:15]: ▸ > Task :app:processDebugManifest
[21:24:25]: ▸ > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
[21:24:25]: ▸ > Task :app:mergeDebugShaders
[21:24:25]: ▸ > Task :app:compileDebugShaders NO-SOURCE
[21:24:25]: ▸ > Task :app:javaPreCompileDebug
[21:24:25]: ▸ > Task :app:generateDebugAssets UP-TO-DATE
[21:24:25]: ▸ > Task :app:mergeDebugAssets
[21:24:25]: ▸ > Task :app:compressDebugAssets
[21:24:25]: ▸ > Task :app:processDebugJavaRes NO-SOURCE
[21:24:27]: ▸ > Task :app:checkDebugDuplicateClasses
[21:24:29]: ▸ > Task :app:desugarDebugFileDependencies
[21:24:45]: ▸ > Task :app:processDebugManifestForPackage
[21:24:51]: ▸ > Task :app:mergeDebugJniLibFolders
[21:24:51]: ▸ > Task :app:mergeLibDexDebug
[21:24:51]: ▸ > Task :app:mergeDebugNativeLibs NO-SOURCE
[21:24:51]: ▸ > Task :app:stripDebugDebugSymbols NO-SOURCE
[21:24:52]: ▸ > Task :app:validateSigningDebug
[21:24:52]: ▸ > Task :app:writeDebugAppMetadata
[21:24:52]: ▸ > Task :app:writeDebugSigningConfigVersions
[21:24:54]: ▸ > Task :app:processDebugResources
[21:24:54]: ▸ > Task :app:mergeExtDexDebug
[21:25:07]: ▸ > Task :app:kaptGenerateStubsDebugKotlin
[21:25:12]: ▸ > Task :app:kaptDebugKotlin
[21:25:19]: ▸ > Task :app:compileDebugKotlin
[21:25:19]: ▸ w: /home/circleci/src/app/src/main/java/com/jumia/myapplication/infrastructure/FlowHandler.kt: (26, 30): No cast needed
[21:25:19]: ▸ w: /home/circleci/src/app/src/main/java/com/jumia/myapplication/ui/di/AppModule.kt: (19, 45): Parameter 'context' is never used
[21:25:19]: ▸ w: /home/circleci/src/app/src/main/java/com/jumia/myapplication/ui/products/ProductDetailFragment.kt: (30, 5): Opt-in requirement marker annotation on override requires the same marker on base declaration (will be an error in 1.6)
[21:25:19]: ▸ w: /home/circleci/src/app/src/main/java/com/jumia/myapplication/ui/products/adapter/ProductAdapter.kt: (31, 13): Name shadowed: holder
[21:25:19]: ▸ w: /home/circleci/src/app/src/main/java/com/jumia/myapplication/ui/util/progress/WaitingDialog.kt: (4, 20): 'ProgressDialog' is deprecated. Deprecated in Java
[21:25:19]: ▸ w: /home/circleci/src/app/src/main/java/com/jumia/myapplication/ui/util/progress/WaitingDialog.kt: (10, 30): 'ProgressDialog' is deprecated. Deprecated in Java
[21:25:19]: ▸ w: /home/circleci/src/app/src/main/java/com/jumia/myapplication/ui/util/progress/WaitingDialog.kt: (19, 13): 'constructor ProgressDialog(Context!)' is deprecated. Deprecated in Java
[21:25:19]: ▸ w: /home/circleci/src/app/src/main/java/com/jumia/myapplication/ui/util/progress/WaitingDialog.kt: (19, 13): 'ProgressDialog' is deprecated. Deprecated in Java
[21:25:19]: ▸ w: /home/circleci/src/app/src/main/java/com/jumia/myapplication/ui/util/progress/WaitingDialog.kt: (23, 22): 'setMessage(CharSequence!): Unit' is deprecated. Deprecated in Java
[21:25:19]: ▸ w: /home/circleci/src/app/src/main/java/com/jumia/myapplication/ui/util/state/Resource.kt: (10, 25): The corresponding parameter in the supertype 'Any' is named 'other'. This may cause problems when calling this function with named arguments.
[21:25:22]: ▸ > Task :app:compileDebugJavaWithJavac
[21:25:22]: ▸ > Task :app:compileDebugSources
[21:25:23]: ▸ > Task :app:transformDebugClassesWithAsm
[21:25:23]: ▸ > Task :app:mergeDebugJavaResource
[21:25:23]: ▸ > Task :app:dexBuilderDebug
[21:25:24]: ▸ > Task :app:mergeProjectDexDebug
[21:25:24]: ▸ > Task :app:packageDebug
[21:25:24]: ▸ > Task :app:assembleDebug
[21:25:24]: ▸ Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
[21:25:24]: ▸ Use '--warning-mode all' to show the individual deprecation warnings.
[21:25:24]: ▸ See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
[21:25:24]: ▸ BUILD SUCCESSFUL in 1m 15s
[21:25:24]: ▸ 38 actionable tasks: 38 executed
[21:25:25]: Cruising back to lane 'android assemble' 🚘
[21:25:25]: --------------------------------------------------------------
[21:25:25]: --- Step: Switch to android assemble_test_application lane ---
[21:25:25]: --------------------------------------------------------------
[21:25:25]: Cruising over to lane 'android assemble_test_application' 🚖
[21:25:25]: --------------------------------------
[21:25:25]: --- Step: assembleDebugAndroidTest ---
[21:25:25]: --------------------------------------
[21:25:25]: $ /home/circleci/src/gradlew assembleDebugAndroidTest -p .
[21:25:25]: ▸ Picked up _JAVA_OPTIONS: -Xmx3200m
[21:25:26]: ▸ > Configure project :app
[21:25:26]: ▸ WARNING:API 'BaseVariant.getApplicationIdTextResource' is obsolete and has been replaced with 'VariantProperties.applicationId'.
[21:25:26]: ▸ It will be removed in version 7.0 of the Android Gradle plugin.
[21:25:26]: ▸ For more information, see TBD.
[21:25:26]: ▸ To determine what is calling BaseVariant.getApplicationIdTextResource, use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
[21:25:26]: ▸ > Task :app:preBuild UP-TO-DATE
[21:25:26]: ▸ > Task :app:preDebugBuild UP-TO-DATE
[21:25:26]: ▸ > Task :app:compileDebugAidl NO-SOURCE
[21:25:26]: ▸ > Task :app:compileDebugRenderscript NO-SOURCE
[21:25:26]: ▸ > Task :app:dataBindingMergeDependencyArtifactsDebug UP-TO-DATE
[21:25:26]: ▸ > Task :app:dataBindingMergeGenClassesDebug UP-TO-DATE
[21:25:26]: ▸ > Task :app:generateDebugResValues UP-TO-DATE
[21:25:26]: ▸ > Task :app:generateDebugResources UP-TO-DATE
[21:25:26]: ▸ > Task :app:processDebugGoogleServices UP-TO-DATE
[21:25:26]: ▸ > Task :app:mergeDebugResources UP-TO-DATE
[21:25:26]: ▸ > Task :app:dataBindingGenBaseClassesDebug UP-TO-DATE
[21:25:26]: ▸ > Task :app:dataBindingTriggerDebug UP-TO-DATE
[21:25:26]: ▸ > Task :app:generateDebugBuildConfig UP-TO-DATE
[21:25:26]: ▸ > Task :app:writeDebugApplicationId UP-TO-DATE
[21:25:26]: ▸ > Task :app:generateSafeArgsDebug UP-TO-DATE
[21:25:26]: ▸ > Task :app:checkDebugAarMetadata UP-TO-DATE
[21:25:26]: ▸ > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
[21:25:26]: ▸ > Task :app:extractDeepLinksDebug UP-TO-DATE
[21:25:26]: ▸ > Task :app:processDebugMainManifest UP-TO-DATE
[21:25:26]: ▸ > Task :app:processDebugManifest UP-TO-DATE
[21:25:26]: ▸ > Task :app:processDebugManifestForPackage UP-TO-DATE
[21:25:26]: ▸ > Task :app:processDebugResources UP-TO-DATE
[21:25:26]: ▸ > Task :app:kaptGenerateStubsDebugKotlin UP-TO-DATE
[21:25:26]: ▸ > Task :app:kaptDebugKotlin UP-TO-DATE
[21:25:26]: ▸ > Task :app:compileDebugKotlin UP-TO-DATE
[21:25:26]: ▸ > Task :app:javaPreCompileDebug UP-TO-DATE
[21:25:26]: ▸ > Task :app:compileDebugJavaWithJavac UP-TO-DATE
[21:25:26]: ▸ > Task :app:transformDebugClassesWithAsm UP-TO-DATE
[21:25:26]: ▸ > Task :app:preDebugAndroidTestBuild SKIPPED
[21:25:26]: ▸ > Task :app:compileDebugAndroidTestAidl NO-SOURCE
[21:25:26]: ▸ > Task :app:processDebugAndroidTestManifest
[21:25:26]: ▸ > Task :app:bundleDebugClasses
[21:25:26]: ▸ > Task :app:generateDebugAndroidTestBuildConfig
[21:25:26]: ▸ > Task :app:checkDebugAndroidTestAarMetadata
[21:25:26]: ▸ > Task :app:compileDebugAndroidTestRenderscript NO-SOURCE
[21:25:26]: ▸ > Task :app:generateDebugAndroidTestResValues
[21:25:26]: ▸ > Task :app:generateDebugAndroidTestResources
[21:25:26]: ▸ > Task :app:mergeDebugAndroidTestResources
[21:25:26]: ▸ > Task :app:mergeDebugAndroidTestShaders
[21:25:26]: ▸ > Task :app:compileDebugAndroidTestShaders NO-SOURCE
[21:25:26]: ▸ > Task :app:generateDebugAndroidTestAssets UP-TO-DATE
[21:25:26]: ▸ > Task :app:javaPreCompileDebugAndroidTest
[21:25:26]: ▸ > Task :app:mergeDebugAndroidTestAssets
[21:25:26]: ▸ > Task :app:compressDebugAndroidTestAssets
[21:25:27]: ▸ > Task :app:processDebugAndroidTestJavaRes NO-SOURCE
[21:25:27]: ▸ > Task :app:mergeDebugAndroidTestJniLibFolders
[21:25:27]: ▸ > Task :app:mergeDebugAndroidTestNativeLibs NO-SOURCE
[21:25:27]: ▸ > Task :app:checkDebugAndroidTestDuplicateClasses
[21:25:27]: ▸ > Task :app:processDebugAndroidTestResources
[21:25:27]: ▸ > Task :app:desugarDebugAndroidTestFileDependencies
[21:25:27]: ▸ > Task :app:kaptGenerateStubsDebugAndroidTestKotlin
[21:25:27]: ▸ > Task :app:kaptDebugAndroidTestKotlin
[21:25:28]: ▸ > Task :app:compileDebugAndroidTestKotlin
[21:25:28]: ▸ > Task :app:compileDebugAndroidTestJavaWithJavac
[21:25:28]: ▸ > Task :app:compileDebugAndroidTestSources
[21:25:28]: ▸ > Task :app:mergeDebugAndroidTestJavaResource
[21:25:30]: ▸ > Task :app:mergeLibDexDebugAndroidTest
[21:25:30]: ▸ > Task :app:transformDebugAndroidTestClassesWithAsm
[21:25:30]: ▸ > Task :app:dexBuilderDebugAndroidTest
[21:25:30]: ▸ > Task :app:validateSigningDebugAndroidTest
[21:25:30]: ▸ > Task :app:writeDebugAndroidTestSigningConfigVersions
[21:25:30]: ▸ > Task :app:mergeProjectDexDebugAndroidTest
[21:25:30]: ▸ > Task :app:mergeExtDexDebugAndroidTest
[21:25:30]: ▸ > Task :app:packageDebugAndroidTest
[21:25:30]: ▸ > Task :app:assembleDebugAndroidTest
[21:25:30]: ▸ Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
[21:25:30]: ▸ Use '--warning-mode all' to show the individual deprecation warnings.
[21:25:30]: ▸ See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
[21:25:30]: ▸ BUILD SUCCESSFUL in 5s
[21:25:30]: ▸ 50 actionable tasks: 27 executed, 23 up-to-date
[21:25:30]: Cruising back to lane 'android assemble' 🚘
[21:25:30]: Cruising back to lane 'android instrumentation_tests_testlab' 🚘
[21:25:30]: ----------------------------------------
[21:25:30]: --- Step: run_tests_firebase_testlab ---
[21:25:30]: ----------------------------------------
[21:25:30]: Starting run_tests_firebase_testlab plugin...
[21:25:30]: The 'model', 'version', 'locale' and 'orientation' params are deprecated and will be removed in version 1.0!
[21:25:30]: Save Google Cloud credentials.
[21:25:30]: Set Google Cloud target project.
[21:25:30]: $ gcloud config set project project-id
[21:25:31]: ▸ Updated property [core/project].
[21:25:31]: Authenticate with Google Cloud.
[21:25:31]: $ gcloud auth activate-service-account --key-file client-secret.json
[21:25:32]: ▸ Activated service account credentials for: [firebase-adminsdk-4ltda@ecommerce-35eeb.iam.gserviceaccount.com]
[21:25:32]: Running instrumentation tests in Firebase Test Lab...
[21:25:32]: $ mkfifo testlab-pipe
[21:25:32]: $ tee instrumentation_output.txt < testlab-pipe & gcloud firebase test android run --type instrumentation --app app/build/outputs/apk/debug/app-debug.apk --test app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk --device model=Samsung,version=26,locale=en_US,orientation=portrait --timeout 30m > testlab-pipe 2>&1
[21:25:32]: ▸ Have questions, feedback, or issues? Get support by visiting:
[21:25:32]: ▸ https://firebase.google.com/support/
[21:25:33]: ▸ ERROR: (gcloud.firebase.test.android.run) Unable to access the test environment catalog: ResponseError 403: Not authorized for project project-id
[21:25:33]: $ rm testlab-pipe
[21:25:33]: Create firebase directory (if not exists) to store test results.
[21:25:33]: Parse firebase bucket url.
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Lane Context |
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
| DEFAULT_PLATFORM | android |
| PLATFORM_NAME | android |
| LANE_NAME | android instrumentation_tests_testlab |
| GRADLE_BUILD_TYPE | DebugAndroidTest |
| GRADLE_ALL_APK_OUTPUT_PATHS | ["/home/circleci/src/app/build/outputs/apk/debug/app-debug.apk", "/home/circleci/src/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk"] |
| GRADLE_ALL_AAB_OUTPUT_PATHS | [] |
| GRADLE_ALL_OUTPUT_JSON_OUTPUT_PATHS | ["/home/circleci/src/app/build/outputs/apk/debug/output-metadata.json", "/home/circleci/src/app/build/outputs/apk/androidTest/debug/output-metadata.json"] |
| GRADLE_ALL_MAPPING_TXT_OUTPUT_PATHS | [] |
| GRADLE_APK_OUTPUT_PATH | /home/circleci/src/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk |
| GRADLE_OUTPUT_JSON_OUTPUT_PATH | /home/circleci/src/app/build/outputs/apk/androidTest/debug/output-metadata.json |
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+
[21:25:33]: 'bucket_url' value must be a String! Found File instead.

+------+--------------------------------------------------+-------------+
| fastlane summary |
+------+--------------------------------------------------+-------------+
| Step | Action | Time (in s) |
+------+--------------------------------------------------+-------------+
| 1 | default_platform | 0 |
| 2 | Switch to android assemble lane | 0 |
| 3 | Switch to android assemble_build lane | 0 |
| 4 | assembleDebug | 75 |
| 5 | Switch to android assemble_test_application lane | 0 |
| 6 | assembleDebugAndroidTest | 5 |
| 💥 | run_tests_firebase_testlab | 2 |
+------+--------------------------------------------------+-------------+

[21:25:33]: fastlane finished with errors

[!] 'bucket_url' value must be a String! Found File instead.

Exited with code exit status 1
CircleCI received exit code 1

@YassinELhadedy
Copy link
Author

@bffcorreia please find issue

@YassinELhadedy
Copy link
Author

@SylvainGirod please find issue

@marcosalis
Copy link

Hey @YassinELhadedy I ran into the same error message. In the unlikely case you're still looking for an answer, the issue is in the test APK and Android test APK paths which are probably incorrect in your fastlane plugin configuration. Check the instrumentation_output.txt generated by running the plugin lane, you'll see a more detailed message.

In my case it was due to the build.gradle using the version number to rename the generated APK files in the app's build folder.
You can set a custom path and file name from the lane configuration:

  lane :instrumentation_tests_testlab do
     ...
      app_apk: 'app/build/outputs/apk/debug/my-debug.apk',
      android_test_apk: 'app/build/outputs/apk/androidTest/debug/my-androidTest.apk'

@bffcorreia bffcorreia added the help wanted Need help? We will do our best to help you. label Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Need help? We will do our best to help you.
Projects
None yet
Development

No branches or pull requests

3 participants