Javascript error in rails app (locally run) - javascript

I am trying to move a development environment from production to my local machine (Ubuntu), and when I get the code up and running on my box, the site works in rails but I get this JS error:
Permission denied for http://ad.doubleclick.net to call method Location.toString on http://localhost:3000.
Line 0
Do you have any idea how to fix JS problems, or should I disable the ads in development?

This is most likely an error that you can ignore. Its probably contained to an iframe created by the advertisement module.
I'm pretty sure that error occurs on the production version too, unless the production version is actually hosted at ad.doubleclick.net, which I guess its not :)

Related

Weird CORS errors on fresh vue cli project

I just started building my second Vue project, and for the first time I wanted to use the Vue CLI and NPM rather than just loading Vue via CDN.
Installing the CLI and setting up the project worked without problems, but when I ran "npm run serve" and navigated to localhost:8080 in my browser (latest Firefox) to see if it worked, I got the following error message in my browser console multiple times:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://10.126.86.51:8080/sockjs-node/info?t=1584021154635. (Reason: CORS request did not succeed).
I also get this error message once right after loading the page:
[WDS] Disconnected!
Does anyone know what these errors mean, why I get them and how I can get rid of them?
The first one seems to be related to some kind of cross-origin call that the app is making using the host's actual IP rather than localhost, but I can't think of any reason why it would, given that I literally just installed and served the example project and did not change anything after running "vue create"
Edit: I am on Ubuntu 19.10 Desktop
First of all, what kind of OS you are working on? If you are working on unix based systems, a service (like nginx) could produce this error. If so, try stopping it.
Afterwards I would try to run your application from vue ui.
Type in your terminal:
vue ui
This starts the web based graphical user interface of vue cli. You can handle your app development from there by starting your service and run your build command.
ATTENTION: you must add (import, NOT create) your project (root folder) to the UI.
If you get the same error inside your browser console, set up a vagrant box. First steps are explained here:
https://www.vagrantup.com/intro/getting-started/
Follow instructions for project setup.
Simplest way would be running
vagrant init
inside your project folder. Therefore you don't have to setup a new project.
After running the init command, try running
npm run serve
or use vue UI instead (as explained above), if you prefer it.
If the problem still exists, more infos about your OS would be helpful.

Error: GET http://localhost:4200/assets/vendor.js net::ERR_INVALID_CHUNKED_ENCODING, on Ember.js server

I am just getting started with Ember.js at v2.9.0, followed the tutorial on their page https://guides.emberjs.com/v2.9.0/tutorial/ember-cli/, all good, save for one detail: Whenever I tried to refresh or load the development web app on Chrome browser after executing ember server on the cmd, the app would not load in browser and provide the following error most of the time (there were other errors as well but seem to be related to this one):
GET http://localhost:4200/assets/vendor.js net::ERR_INVALID_CHUNKED_ENCODING
, and one of the related errors is:
Uncaught ReferenceError: define is not defined
at application.js:1
I have searched for this specific error but without luck, I tried some fix hints found, such as clearing some persistent data with the netsh command, doing an npm cache clean bower cache clean, deleting the node_modules and the bower_components folders and reinstalling dependencies; also ensuring that there was no weird proxy configuration in my LAN settings, etc.
I have encountered this error while following the tutorial, and it would kind of be bypassed by refreshing the browser a few times until the app displayed. That was before, but now the refresh does not work when working on an existing application.
I am on:
Windows 10
ember-cli v.2.9.1
node.js LTS v.6.9.1
I need to get going with this rather soon, so any hint to resolve this issue is appreaciated. Thanks!
Might be a conflicting process running... Are you working over a VPN? If so, take a look at https://superuser.com/questions/893908/err-invalid-chunked-encoding-from-chrome

Session is not Defined Using OpenShift for a Meteor Application

I am trying to use OpenShift for my Meteor application which uses session variables. The application loads fully, but once the user begins interacting with it, the site fails to load anything because "ReferenceError: Session is not defined." This is really weird because the application runs flawlessly on localhost. Anyone know why this could occur?
You need to add the 'Session' package with 'meteor add session'. I've had the same error in the past when I forgot to add the package.

Running meteor app on Windows from MacOS

I got a Meteor project from a friend who develops on MacOS.
When trying to run it, I get:
This project uses METEOR#1.0.2.1, which isn't available on Windows. To
work with this app on all supported platforms, use meteor update
--release METEOR#1.2.1 to pin this app to the newest Windows-compatible release.
When running it, I get:
While checking for cfs:gridfs#0.0.27: no compatible binary file
found...
Then, when I try to override (use run instead of update), without actually updating, it starts proxy and Mongo, but then breaks at, but skips the first error
While building package npm-container: error: No plugin known to handle
file '../../packages.json'. If you want this file to be a static
asset, use addAssets instead of addFiles; eg,
api.addAssets('../../packages.json', 'client').
I read that this error is fixed by updating meteorhacks, but when I try to, I get the Meteor version conflicts (see very first error) and I have no idea how to break out of the loop.
Can someone shine some light on how to fix any of these error?

Deploying JS apps to Windows 8 gets resources.pri access denied error

I'm trying to run my apps, but it is suddenly getting this error. I don't know why. I haven't changed anything.
Error 3 Error : DEP0500 : The folder "C:\Users\Shane\Documents\Visual Studio 2012\Projects\App2\App2\bin\Debug\AppX" could not be deleted.
Access to the path 'resources.pri' is denied,
I'm running VS2012 as Administrator and I've removed everything from the debug directory. I can't find anything on how to get rid of this error.
Looks like this is a bug with Parallels. If you kill prl_cc.exe the files should be unlocked.
Are you sure all instances of your app, including those in the simulator are terminated?
If you are using Windows on Mac with Parallels, it seems to be a known issue and there is a workaround here:
http://forum.parallels.com/showthread.php?267785-Parallels-Control-Center-is-incorrectly-locking-my-pri-files

Categories