I always get this error whenever I try to playback a testcase in Selenium
[error] Permission denied for <http://www.facebook.com> to get property Location.href
It sounds like you are bumping into javascript's same-domain security policy.
See here: http://www.codingforums.com/showthread.php?t=117050.
Without more information about your test case, it's hard to be specific, but the basic problem might be
JavaScript has a same domain policy for security reasons. That means
it can not touch other domains.
In the example in the linked resource, the user was able to replace
top.document.location.href = searchLocation;
with
window.open(searchLocation, "_top");
to solve the problem.
Related
I've installed FusionAuth (awesome product) into a Docker Swarm cluster using the official docker-compose.yml file and everything seems to work brilliantly.
EXCEPT
Periodically, when a user goes to login they will be presented with the above error stating that the search engine is not available. If they try again immediately then everything works correctly! I would, obviously, prefer that they never saw the error.
Elasticsearch is definitely running and is responding to API calls correctly, and I can see the fusionauth_user index is present and populated with docs.
I guess my question is two fold:
1) What role does the ElasticSearch engine play in the FusionAuth ecosystem and can it be disabled?
2) Is there a configurable timeout somewhere that is causing the error message and, if so, where can change it?
I've search the docs for answers to the above but I can't seem to find anything :-(
Thanks for the kind feedback.
1) What role does the ElasticSearch engine play in the FusionAuth ecosystem and can it be disabled?
Elasticsearch provides full text search of user data. Each time a user is created or updated the user is re-indexed. In this case during login, we are updating the search index with the last login instant.
This service is required and cannot be disabled. We have had clients request to make this service optional for embedded applications or small scale scenarios where Elasticsearch may not be required. While this is not currently in plan, it is possible we may revisit this option in the future.
2) Is there a configurable timeout somewhere that is causing the error message and, if so, where can change it?
Not currently.
Full disclosure, I am not a Docker or Docker Swarm expert at all - perhaps there are some nuances to Swarm and response time due to spin up and spin down of resources?
Do you see any exceptions in the log when a user sees this error on the login?
Whenever I try to log into github from IntelliJ, I get this error.
Even thought my authentication data is correct, it tells me it's not. And it doesn't matter if I use a token or just use my credentials. I get the same problem. I've tried to delete all tokens and generated a new one, this also didn't change anything. What could be the problem? Thanks.
The issue might be caused by some proxy in the middle. Invalid authentication data is a generic message that appears when call to GitHub API fails without clear reasons. Connection reset seems to be the real message, and could be caused by some proxy or network firewall.
Check the logs for more details on the error. If you think it is some bug in IntelliJ, it is worth reporting the issue to http://youtrack.jetbrains.com/ with logs attached.
What would be the best way to debug Parse Cloud Code? Currently it's a mess of logging to the console and checking logs. Does anyone have a good workable solution?
During development, you should begin by testing against a local hosted server. I.e., I use VS Code. You can set breakpoints and watch variables for their values. You can set up a tool like ngrok to get a remote URL for your local endpoint so you can test with non-local hosted clients if you'd like.
We also use Slack extensively. We've created our own slack bot, and it has several channels it reports relevant information too, triggered from our parse-server. One of these is a dev error channel. Instead of console.logs, which are hard to sift through and find what you're looking for, we push important information to Slack. We don't switch every single console.log to a slack message, just the important "Hey something went wrong here's the information" messages. This brings them to our attention so we can identify and resolve them way faster. Slack is awesome. I recommend using slack, even on a solo project.
at the moment you can access your Logs using a console.log() or console.error() for functions and all general logs of everything that happens with your app, at Back4App you can access using: Server Settings -> Logs -> Settings -> Server System Log.
Or functions and all logs generated by Parse server, they're: request.log.info() and request.log.error(), at Back4App you can access using: Dashboard -> Logs.
I've been looking into New Relic, BugSnag, and a few others, but no one seems to be catching 404 errors in their client-side monitoring. For example, say I have the following script tag in a given page:
<script src="//cdn.example.com/app.js1445291270"></script>
with the minor but critical typo of missing a ? after .js.
This of course returns a 404 and the script never loads.
Are there any services that would catch client-side errors like this?
You should be able to do this with Bugsnag. You can detect whether the status= 404, and use Bugsnag.notifyException() to send the error in. Hope this helps!
TrackJS error monitoring supports this use case. Here is how to add monitoring for resource loading failures.
How to handle cross-domain functionality in selenium.can any one explain me plz?
For ex: need to open Google.com and gmail, Using same selenium session object, I was seeing permission denied error , i tried with *iehta, Proxy injection mode as well it didn't work can you help me out..
I found this anwer on stackexchange.com:
You should be able to do so while using browsers with elevated
security privileges like *chrome for firefox. So you could just do
selenium.open("newURL");
in your test. Problem of changing URL is, it change in domain and
normal Selenium browser mode is restricted by Java Script's Same
Origin Policy, as I mentioned above browsers with elevated security
privileges should get you going.
I suppose this is the point where you are trying to load another URL
in same selenium session -
sel.open("www.google.com");
sel.waitForPageToLoad(stimeout);
First - don't use waitForPageToLoad, open api takes care of it.
Now if sel.open does not work then you should definitely encounter
error. Don't keep you method in try catch block and see the error you
encounter....
1:
https://sqa.stackexchange.com/questions/761/can-the-base-url-be-changed-in-the-same-browser-session-using-selenium-rc
If can't open two different domains with one selenium object, try using a different object for each domain (e.g. an object called seleniumGoogle and an object calledseleniumGmail).