JSCONSOLE does not work - javascript

I followed the instructions:( point browser to http://jsconsole.com, type :listen, got the descriptor, and put that little script into my web page...) ,but I only got the following output:
Creating connection...
Connected to ...
sent remote command
Nothing from the console.log got displayed.
I tried both edge and google chrome on my windows 10.I also tried to install a local version under node.js, but still no luck.
Not sure what's wrong, can somebody help? Thanks

Related

Cypress.io: Server Error | 404 - File or director not found

I'm currently trying to automate the test for a pretty big webapplication (DMS) Document Management System. To explain the system a little bit: There is a loadbalancer which connect to one of two frontends. To be sure that will be no problems in my test I directly try to access frontend one. Now to my problem:
When trying to run all the tests (around 20 spec-Files) with the Test Runner and also when trying to run the tests via console with the following command: .\node_modules\.bin\cypress run --spec "cypress/integration/Basis/**/*" --browser chrome
Sometimes after a cy.visit() a Server Error comes up. That error also stops the tests on console from running and looks like it crashes cypress. The error is the following:
It's not possible that the resource is missing or somewhere else because most of the times the test works. Most of the time its a different test where the error comes up. The worst part is that I have no idea how to reproduce that error. And it looks like that problem is only appearing for me.
So please tell me if you have ever seen this message and maybe you can help me fix this problem. Thank you for your help.
This is caused by a bug in Cypress which causes usages of window.location.href and other Location methods to incorrectly use /__/ as the base URL.
You can try enabling the experimentalSourceRewriting config option to work around this, read here for more info: https://docs.cypress.io/guides/references/experiments.html#Configuration

I have difficulties using the Live server extension in vscode in my windows PC

I am a newbie in JavaScript. I just downloaded the Live server extension in VScode. When i go live by clicking on the 'GO LIVE' in the VScode status bar, my server is started at a particular port but it doesn't open up my default browser which is chrome so that i can see the outcome of my code.
I am really stuck and i need help. Thanks in anticipation for taking your time to help me fix this.
Add this line to your settings.json:
"liveServer.settings.CustomBrowser": "chrome"
(On Windows %AppData%\Code\User\settings.json, on Linux $HOME/.config/Code/User/settings.json, and on macOS $HOME/Library/Application Support/Code/User/settings.json)
Note: Make sure to add a Comma to the end of the previous line inside of the json. Example:
{
"window.zoomLevel": 0, //note the comma at the end here
"liveServer.settings.CustomBrowser": "chrome"
}

SMART on FHIR client-js: Invalid Character Error on IE11

Note: The issue is also reported on GitHub. Please take a look at Git issue as well for current progress/investigation.
I'm using fhir-client v0.1.15 to develop a SMART on FHIR web application that would run in EHR launch scenario. For example in Epic Hyperspace simulator that uses IE to run the SMART application.
While testing my application locally(localhost) on IE11, I get a JavaScript error from within fhir-client.js.
SCRIPT1014: Invalid character
File: fhir-client.js, Line: 38113, Column: 3
Below are the two lines from code. 38112 & 38113 in order:
var ret = Adapter.get().defer();
var state = JSON.parse(sessionStorage[params.state]);
Any solution or workaround would be much appreciated.
Updated
Upon further investigation we found that sessionStorage is empty when line with JSON.parse executes. However, strange thing is why/how sessionStorage gets empty after redirection from authorization server. This only happens with IE11, everything works fine on Chrome though.
PS. Can someone please add a new tag SMART or SMARTonFHIR?
Though I couldn't find the exact root cause and solution but let me share the findings that helped me resolve this issue somehow.
The issue doesn't exist when I test my SMART application with redirect_uri(in FHIR.oauth2.authorize call) set to a staging server URL instead of localhost.
PS. I’m open to better, and more qualified answers for acceptance.

iOS: Javascript code in WKWebView got “query cancelled” error after selecting photo from photo library and before uploading to the server

I use Xcode 9.1(9B55), iOS 11.1 both simulator and real iPhone/iPad.
The website(HTML5+Javascript) I used in mobile safari acts perfectly. But in my iOS app(Objective-C), which uses WKWebView to access the same web page, and set all the "privacy - Photo Library Usage" and others, always got the error below after selecting photo from photo library and before uploading to the server:
[discovery] errors encountered while discovering extensions: Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled}
But something strange was that I had a successful run for just one time.
I've several threads about this issue, but have no clear solution. Someone said it's a bug of iOS 11.x, but I've tried it on iOS 9.x, the error was same.
I had the same issue on iOS 12.1. I spent a lot of time trying to figure out why I'm getting this error. I thought because of that error I can't upload an image to the server. But turned out on each try, the request fails with 401 status code because of permissions or additional http headers/cookies. In my case, this debug error meant nothing I thought(Maybe that's why additional argument OS_ACTIVITY_MODE = disabled in project scheme worked for other guys, because it just removed debug log from console). So, make sure you have a correct HTTP request with all permissions/headers as well. Maybe it will help you as It helped me. Good luck.

Chrome Javascript Console Stopped Working

I am working on a meteor.js app and I am using Session.set and Session.get to pass data along. Now last night my app was working just fine but this morning none of it seems to be working. And whenever i try to get a session from the chrome console it just prints out whatever I typed with out giving any messages or any data.
Ex:
Session.get("min-distance-query");
just prints out: Session.get("min-distance-query");
I also have functions to get my lon/lat coords Geolocation.latLng(); which was working as well before I went to bed and this morning it is also not working.
And again it does the same thing in the console when I try to run the function in there. It just prints out Geolocation.latLng(); where it used to print out an object with a lng/lat value in it.
Has any one experienced this before?
Thanks to Niloct I have been able to get the console to function as expected.
As he mentioned in the comments I just had to reinstall chrome and it began working again.
NOTE: the Gelocation.lngLat(); function is apparently not working because of an unrelated issue regarding chrome. A stack overflow post about this issue can be found here: Chrome navigator.geolocation.getCurrentPosition() error 403
Hopefully it will get resolved soon.

Categories

Resources