I think I set everything up correctly to test my extension on Android Nightly:
When I run web-ext run -t firefox-android --adb-device R58MB63N2SE --firefox-apk org.mozilla.fenixfor this or any other extension, I get this error:
o: installTemporaryAddon: Error: Error: Could not install add-on at '/sdcard/web-ext-artifacts-1613228108658/i_don_t_care_about_cookies-3.2.8.xpi': [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIZipReader.open]" nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)" location: "JS frame :: resource://gre/modules/addons/XPIInstall.jsm :: XPIPackage :: line 321" data: no]
at /usr/lib/node_modules/web-ext/dist/web-ext.js:1:6007
at Client.handleMessage (/usr/lib/node_modules/web-ext/node_modules/@cliqz-oss/firefox-client/lib/client.js:162:7)
at Client.readMessage (/usr/lib/node_modules/web-ext/node_modules/@cliqz-oss/firefox-client/lib/client.js:221:10)
at Client.onData (/usr/lib/node_modules/web-ext/node_modules/@cliqz-oss/firefox-client/lib/client.js:187:16)
at Socket.emit (node:events:378:20)
at addChunk (node:internal/streams/readable:313:12)
at readableAddChunk (node:internal/streams/readable:288:9)
at Socket.Readable.push (node:internal/streams/readable:227:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
From the error it sounds like your Firefox for Android doesn’t have the “Storage” permission in Android. To check, go to the app details in settings and then make sure the Storage permission is granted.
@plwt I am able to successfully install the extension using collections, thanks! It works pretty much fine. But I am not able to test the version I’m currently developing like that.
@freaktechnik I checked. The app already had the storage permission granted.
I remember it was a mess setting it up for the first time. But I know I’ve just followed one of the MDN tutorials and it worked. So maybe check these three:
I’ve just trying to test something on Nightly on Android and it was throwing an error:
s: Required android.permission.READ_EXTERNAL_STORAGE has not be granted for org.mozilla.fenix. Please grant them using the Android Settings or using the following adb command:
adb shell pm grant org.mozilla.fenix android.permission.READ_EXTERNAL_STORAGE
Executing the adb command didn’t worked .
But what helped was manually switching Storage permission OFF and then back ON: