Export Chrome MV3 extension to Firefox MV3 - firefox

I've created a test extension using manifest V3 that works in chrome
manifest.json:
{
"manifest_version": 3,
"name": "test",
"version": "0.0.1",
"content_scripts": [
{
"matches": ["*://*/*"],
"js": ["content.js"]
}
]
}
content.js:
alert('test')
I tried running
web-ext run --firefox-preview
A browser window opens, but the extension is not working...
Using the --verbose option I find these errors
Firefox stderr: [Parent 14212, IPC I/O Parent] WARNING: file /builds/worker/checkouts/gecko/ipc/chromium/src/base/process_util_win.cc:167
Firefox stderr: JavaScript error: resource://gre/modules/XULStore.jsm, line 58: Error: Can't find profile directory.
Firefox stdout: console.error: services.settings:
Firefox stdout: main/whats-new-panel Signature failed InvalidSignatureError: Invalid content signature (main/whats-new-panel)
Firefox stdout: console.error: services.settings:
Firefox stdout: main/whats-new-panel local data was corrupted
console.warn: services.settings: main/whats-new-panel Signature verified failed. Retry from scratch
Firefox stdout: console.error: services.settings:
Firefox stdout: main/addons-manager-settings Signature failed again InvalidSignatureError: Invalid content signature (main/addons-manager-settings)
Firefox stdout: console.error: services.settings:
Firefox stdout: Message: InvalidSignatureError: Invalid content signature (main/addons-manager-settings)
Stack:
InvalidSignatureError#resource://services-settings/RemoteSettingsClient.jsm:169:5
_validateCollectionSignature#resource://services-settings/RemoteSettingsClient.jsm:977:13

As it's stated in this article,
"The issue is about host permissions, in MV3, they’re not granted automatically on install, but instead user needs to grant them at some point. Depending on what’s appropriate for your extension, you could ask the user using promise.request() , or they can grant it by going to about:addons, selecting your addon, and flipping the toggle in the permissions tab."

Related

There is no .trace file found for performance profile ‘Leaks’

Following this example and using Javascript, get the following error when run my tests. The error is generated on the following command:
enter code heredriver.executeScript('mobile: stopPerfRecord', [
{ profileName: 'Leaks' },
]);
Error:
Got this error “Request failed with status 500 due to An unknown server-side error occurred while processing the command. Original error: There is no .trace file found for performance profile ‘Time Profiler’ and device XXXX. Make sure the selected profile is supported on this device”

cant start session of Appium server version 1.15.1

This error message is displaying:
An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command 'F:\\gautam\\android\\platform-tools\\adb.exe -P 5037 -s 192.168.0.115\:5555 shell settings delete global hidden_api_policy_pre_p_apps' exited with code 255'; Stderr: 'Security exception: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
java.lang.SecurityException: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
at com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:1815)
at com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1023)
at com.android.providers.settings.SettingsProvider.deleteGlobalSetting(SettingsProvider.java:1006)
at com.android.providers.settings.SettingsProvider.delete(SettingsProvider.java:592)
at android.content.ContentProvider$Transport.delete(ContentProvider.java:343)
at com.android.providers.settings.SettingsService$MyShellCommand.deleteForUser(SettingsService.java:406)
at com.android.providers.settings.SettingsService$MyShellCommand.onCommand(SettingsService.java:289)
at android.os.ShellCommand.exec(ShellCommand.java:103)
at com.android.providers.settings.SettingsService.onShellCommand(SettingsService.java:51)
at android.os.Binder.shellCommand(Binder.java:634)
at android.os.Binder.onTransact(Binder.java:532)
at android.os.Binder.execTransact(Binder.java:735)'; Code: '255'`enter code here
An error tells you: Stderr: 'Security exception: Permission denial: writing to settings requires:android.permission.WRITE_SECURE_SETTINGS
Try following steps:
In your phone developer options (Security settings), enable USB Debugging or (or and) Disable permission monitoring. All of these settings are in your dev options.

I get an error when using selenium chromedriver to create a session where I am logged into my account

The code I'm using start the session doesn't seem to be working, but I don't know what is wrong with it.
I can create a session without logging in and do what I want but when I try to the use the recommended method of creating the driver with an Options object and adding a user-data-dir, I run into errors.
options = Selenium::WebDriver::Chrome::Options.new
options.add_argument('user-data-dir=C:\Users\user\AppData\Local\Google\Chrome\User Data')
driver = Selenium::WebDriver.for(:chrome, options: options)
driver.get("https://login.tripleseat.com/")
email_field = driver["login"]
email_field.send_keys("clshaps93#gmail.com")
email_field.submit
I want my program to get to the bottom section signed into my account without running into an error.
If I don't have a Chrome window already open, I end up with this error:
1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/response.rb:32:in initialize'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/response.rb:69:inassert_ok': unknown error: cannot determine loading status (Selenium::WebDriver::Error::UnknownError)
from no such execution context
If I do have Chrome window already open, I end up with this error:
1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/response.rb:32:in initialize'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/selenium-webdriver-3.141.0/lib/selenium/webdriver/remote/response.rb:69:inassert_ok': unknown error: Chrome failed to start: crashed (Selenium::WebDriver::Error::UnknownError)
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location C:\Program Files (x86)\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Other values I have tried to use for user-data-dir just end up being ignored, in that a session starts without logging me in. Is there some code I need to add somewhere to avoid these errors?

Error publishing "hello world" Microsoft AL app to Dynamics 365 sandbox

I'm attempting to publish the sample app from the Microsoft "Getting Started with AL" article (https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-get-started) to my company's D365 sandbox. I've followed the steps in the guide exactly, but get an authentication error when attempting to download the symbols needed to build and publish the project. My account has full admin privileges, so I shouldn't be getting any errors.
I've found several mentions of this error, but they all apply to building an external app with the NAV package rather than an add-on AL app, and none of the proposed solutions have worked. We have been attempting to get assistance from MS support as well, but have naturally gotten the runaround.
Exact error:
[2019-01-25 11:00:56.01] Using reference symbols cache path: c:\Users\tbarnett\Documents\AL\ALProject1\./.alpackages
[2019-01-25 11:00:56.01] Authenticating...
[2019-01-25 11:00:56.84] Sending request to https://api.businesscentral.dynamics.com/v1.0/sandbox/dev/packages?publisher=Microsoft&appName=Application&versionText=13.0.0.0
[2019-01-25 11:00:56.85] Sending request to https://api.businesscentral.dynamics.com/v1.0/sandbox/dev/packages?publisher=Microsoft&appName=System&versionText=13.0.0.0
[2019-01-25 11:01:25.08] The request for path /v1.0/sandbox/dev/packages?publisher=Microsoft&appName=Application&versionText=13.0.0.0 failed with code Unauthorized. Reason: Authorization has been denied for this request.
[2019-01-25 11:01:25.26] The request for path /v1.0/sandbox/dev/packages?publisher=Microsoft&appName=System&versionText=13.0.0.0 failed with code Unauthorized. Reason: Authorization has been denied for this request.
Microsoft (R) AL Compiler version 2.1.1.3797
Copyright (C) Microsoft Corporation. All rights reserved
Compilation started for project 'ALProject1' containing '1' files at '11:1:25.270'.
c:\Users\tbarnett\Documents\AL\ALProject1\HelloWorld.al(5,45): error AL0247: The target Page "Customer List" for the extension object is not found
Compilation ended at '11:1:25.273'.
Error: The package could not be created.
Account permissions changed, now I receive the following:
New Error:
The request for path /v1.0/sandbox/dev/packages?publisher=Microsoft&appName=System&versionText=13.0.0.0 failed with code Forbidden. Reason: You do not have the following permissions on TableData NAV App: IndirectRead.
To view details about your permissions, see the Effective Permissions page. To report a problem, refer to the following server session ID: '109457'.
launch.json (I've tried with the commented out server URL, which is not mentioned in the guide above, un-commented, but with the same result):
{
"version": "0.2.0",
"configurations": [
{
"type": "al",
"request": "launch",
"name": "Microsoft cloud sandbox",
//"server": "https://gryphonnetworks.crm.dynamics.com",
"startupObjectId": 22,
"startupObjectType": "Page"
}
]
}
My development environment:
Visual Studio Code: Version: 1.30.2 (system setup)
Commit: 61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
Date: 2019-01-07T22:54:13.295Z
AL Language Extension: 2.1.69331
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Windows_NT x64 6.1.7601
Once the underlying error of not having IndirectRead permissions on the TableData NAV app was exposed, I was able to find the following GitHub article which detailed what permissions needed to be added to get the symbols downloaded and publish the app:
https://github.com/Microsoft/AL/issues/1701

NSURLSession from macos Sharing Extension

I'm getting this error in the func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { URLSessionDataDelegate method:
error=Optional(Error Domain=NSURLErrorDomain Code=-1 “unknown error”
UserInfo={NSErrorFailingURLKey=https://www.example.com/,
NSLocalizedDescription=unknown error,
NSErrorFailingURLStringKey=https://www.example.com/})
Very similar code works perfectly from an application, but I'm trying to write an Sharing App Extension which uploads to a webserver.
I'm using URLSessionConfiguration.background(withIdentifier:"...") same as my desktop application.
Why do I get erorr -1?
I was missing the com.apple.security.network.client entitlement in the entitlements file.
https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingAppSandbox.html#//apple_ref/doc/uid/TP40011195-CH4-SW9

Resources