Why navigator.credentials.get function not working in firefox addon - firefox-addon

Calling function navigator.credentials.get({ publicKey }) from background in Firefox addon throws following error The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission..
I cant find any information about that issue. Is there any way to use WebAuthn functions in Firefox addon scripts? In Chrome extension it works without any problems.

I struggled with getting webauthn to work for literally months, turns out there's a stupid firefox bug which throws a false negative- If you have the console open, it doesn't work. Closing the console finally fixed it for me. Here's the bug report:
https://bugzilla.mozilla.org/show_bug.cgi?id=1479500
hope this helps,
Kevin

Related

Jira board UI is not loading

Please see the questions in atlassian community: https://community.atlassian.com/t5/Jira-questions/Jira-board-UI-is-not-loading/qaq-p/2239840
This one is kinda of duplicate in stackoverflow.
I have created new free trial Jira instance recently and my first project there. I am able to create issues there, but my boards like Backlog/Active sprints/Roadmap are not loading in UI. Please see the screenshot
screen1
The issue is not gone after a few hours. I have tested it on three browsers (Firefox, Chromium, Chrome) in both incognito and common modes. Also I have tested it on my phone in browser version. None of the above helped.
In the phone app by the way I am also not able to open issues with this error.
screen2
(not sure if these issues are related or not)
Could you please advise what could be the problem and how to fix it?
there are actually some warnings, errors and 4XX and 5XX responses.
Failed to run init function: TypeError: removeOldAnalytics is not a function function() { determineStorageKey(); setTimeout(bulkPublish, 500); removeOldAnalytics(); }
{"errorMessages":["Internal server error"],"errors":{}}
{"status":"Conflict","message":"User is not enrolled in message 'devops-launch-toolchain-spotlight'","errors":[]}
{"errorMessages":["Invalid request payload. Refer to the REST API documentation and try again."]}
Uncaught (in promise) TypeError: e is undefined
IndexedDB timed out.
{"errors":{},"errorMessages":["The property isDevopsProject does not exist."],"httpStatusCode":{"empty":false,"present":true}}
Source map error: Error: request failed with status 404
Source map error: Error: NetworkError when attempting to fetch resource.
screen3
screen4
I have tested 4 browsers, incognito modes, 2 laptops and 1 phone, my wifi and mobile internet, and nothing works. Same 4XX and 5XX error everywhere. I'm a bit desperate now since I have no clue what is the problem and how to fix it

Error when downloading Apple Pass in Chrome for iOS

Issue with downloading Apple Pass on an iPhone device using Chrome and Firefox. It works fine on Safari. On Chrome for iOS it says:
Sorry, your Pass cannot be installed to Passbook at this time.
For Firefox it says:
Failed to Add Pass An error occurred while adding the pass to Wallet. Please try again later.
I tried just downloading the Apple Pass from a desktop browser and it downloads and I can install it fine on an iPhone/simulator which I'm assuming is not a problem with the pass itself but maybe rather something I'm missing in the response.
Here is the code I'm using to return the Apple Pass.
private void ReturnResponse(byte[] applePass)
{
Response.Clear();
Response.AddHeader("content-disposition", string.Formate("attachment; filename={0}", "sample.pkpass"));
Response.ContentType = "application/vnd.apple.pkpass"
Response.BinaryWrite(applePass);
Response.End();
}
Expected result:
Apple Pass opens and allows the user to add it to their Apple Wallet.
I realise this is question is over a year and a half old, but this is still an issue as of March 2021. After a lot of trial and error we managed to get it working on Chrome & Firefox. Our specific issue was that the request has to be a GET, and we had a form before the Pass was downloaded that submitted as a POST. Once we change the form to submit a GET the issue was resolved.
We tried to keep the POST and return a 201, which feels correct, but the issue persisted.
Changing our request method from a POST to a GET when serving the pkpass made it possible to download the pass using Google Chrome for Mobile on an iOS device.
This is untested, but I have found this link which I feel might be related:
https://github.com/eymengunay/php-passbook/issues/73
It says that the anchor you using to link to the pass should contain the this attribute:
target="_system"
I have not tested this resolution myself.
I just bought 20 access passes from a website. The site had the option to "add to apple wallet". It worked fine for 19 of them and then on the very last one I got this same error.
I did not do anything different when trying to add the 20th one.
Wondering if there is a limitation with the number of passes you can add?... but why would it be limited to a random number like 19?

Previewing rails server on AWS Cloud 9: VFS Connection does not exist [Firefox only]

Update: This is specific to Firefox. This does not occur using Chrome. I will leave the text below as is, but now the main question is, how and what in Firefox is causing this. It occurs regardless of cookie settings, such as allowing third-party cookies and trackers.
Preface: I've searched and read dozens of pages trying to resolve this issue I've gone through all the troubleshooting steps in the AWS documentation, eg,
https://docs.aws.amazon.com/cloud9/latest/user-guide/app-preview.html#app-preview-share
and this thread:
https://forums.aws.amazon.com/message.jspa?messageID=849200 as well as resources on stackoverflow
and the c9 forums
https://community.c9.io/t/what-is-vfs-connection-does-not-exist-on-aws-c9/22697/4)
I am trying to preview a running rails app from the Cloud 9 IDE. When I run the app using rails server, there are no error messages indicating anything wrong. The output shows Started GET '/' for [my home IP] ...... 200 Completed OK.
Console Output:
Trying to preview the running app only produces a "OOPS VFS connection does not exist" screen. The preview url is always https://[user_generated_sequence].vfs.cloud9.[region].amazonaws.com/ All TCP traffic is allowed as per the rules set up by following the troubleshooting guides.
OOPS error message page:
The same issue occurs whether using puma or WEBrick. With WEBrick, a popup for the preview link appears, but leads to the same error message page. With puma, the running app is listening on tcp://[localhost/0.0.0.0]:[8080 or 3000]. With WEBrick, it listens instead on http://localhost:8080.
I have followed the instructions exactly in the rails tutorial to set up a simple app. Everything in the code itself should be fine. How can I get this to work correctly? I'm very confused and about to give up on rails.
I recently had the same issues after updating Firefox because cross-site cookies are required to preview a running rails application. If, like me, you have disabled that in Firefox as part of strict Enhanced Tracking Protection, they will need to be enabled at least for this specific site.
Make sure you are accessing the preview from the same browser:
This URL works only when the IDE for the environment is open and the
application is running in the same web browser
https://docs.aws.amazon.com/cloud9/latest/user-guide/app-preview.html#app-preview-preview-app
Something that worked for me, do the following:
run:
rails s
the in the AWS EDE click on 'Preview' and 'Select Running Application'
Once it will open click on the button/link and it should open in another window with the running application.
Note: Doing this manually by copying the URL link and pasting in another tab did not work for me.
Try disable Ad Blockers and privacy Extention. It worked for me.
Basically you need to allow third party cookies
in chrome it's
Settings >> Security >> Cookies and web data >> Choose second option(block cookies only in incognito)
That works for me
On cloud9, click the shield logo in the address bar and switch "Enhanced Tracking Protection" to be off. Then refresh the page and the preview.
I was struggling with this as well. Finally, I changed the cookie setting from all third-party cookies to cookies from unvisited sites (See image)
Cookie Settings for Firefox

How do I get Geolocation API to work in Dartium?

I'm trying to test in Dartium browser using the Geolocation API. In particular I try doing the following
window.navigator
.geolocation.getCurrentPosition()
..then((pos) {
window.alert(pos.toString());
})
..catchError((PositionError error) {
window.alert("Error code: ${error.code}, Error message: ${error.message}");
})
..whenComplete(() => window.alert("complete"))
;
Ignoring the fact I'm using window.alert here, All I get is an error with the following message "Error code: 2, Error message: Network location provider at 'https://www.googleapis.com/' : Returned error code 400."
However the same code works in Google Chrome when I use "pub serve". It also works with Firefox. How do I overcome this error, and get it to work in Dartium? Is it even possible?
UPDATE
I took a look at the 403 bug and tried using the fix specified on this page http://www.chromium.org/developers/how-tos/api-keys, and when I first tried this, I got my credentials and setting wrong, I was getting a 403 error, but once that was resolved, and all the APIs enabled, plus the environment settings of
GOOGLE_API_KEY
GOOGLE_DEFAULT_CLIENT_ID
GOOGLE_DEFAULT_CLIENT_SECRET
I was back to "Network location provider at 'https://www.googleapis.com/' : Returned error code 400.", so I conclude it isn't the same issue. Though if someone can prove me wrong, I'd be happy.
FURTHER UPDATE
This is a bug. I've answered my own question below.
Maybe you are running into this issue
Geolocation giving 403 error
Should be fixable by providing Google API keys for Dartium
This is a bug.
I posted this question on https://groups.google.com/a/dartlang.org/forum/#!topic/web/UMJHJlQH7wc, where Seth Ladd asked me to open a bug.
I've opened a bug for this, https://code.google.com/p/dart/issues/detail?id=15866. So hopefully this will be resolved soon.

Facebook iOS Mobile Web JS SDK Error

We already have Facebook working on our main desktop app without an issue. When I added the same setup code to our mobile site I received an error from the JavaScript SDK:
Received message of type object from https://s-static.ak.facebook.com, expected a string
Then, I changed the setup code to an exact replica from here: https://developers.facebook.com/docs/guides/mobile/web/ and received the exact same message.
This error only shows when the user-agent is iOS or Android in Chrome Developer Tools or in the iOS Simulator. When it's running from the desktop, we aren't seeing this error.
Any idea what's going on here?
Thanks :)
With all due respect, I believe that bokonic's answer is missing the point. The immediate reason of the message you're receiving is most likely javascript postMessage method. It is used to communicate your website with an object returned by window.open or an iframe's embedded website.
window.parent.postMessage(message, targetOrigin);
You might want to have a look at this article to see how it works.
According to MDN reference first argument of the postMessage method can be of any type. Still, Prior to Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3), the message parameter must be a string.
I tested the method on Chrome 28.0.1500.72 (latest version when writing this answer) and it works fine when passing an object but still throws the warning message to the console. I believe that facebook feels uncomfortable with passing some rich data as a string so they pass it as an object and simply doesn't care about the warning. Or, since there is a workaround (e.g. JSON.stringify), they have a bug they don't know about.
I had the same error. This isn't necessarily the reason you're getting it, but I ended up looking at the packets being received by my iphone simulator, and here's the error from s-statick.ak:
[truncated] <span>Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one o
For me, the error is that on my device(s), I'm accessing the site through an ip address (192.168.xx etc) and on local development I have hosts routing localhost to a url that is in my facebook app config... so the IP isn't configured for the app.
Facebook won't let me use an IP address, so it seems like the only option is a test deploy or a DNS server. Hope this helps you out.

Resources