I am working on a project with asp.net core 2.2 and react.
Recently I sent a new version to my client, but I got the feedback that the browser window is blank always. I told my client to check the browser console for any fault messages.The browser was showing the following message:
Uncaught SyntaxError: Unexpected token <
I was not able to reproduce this message, so I ask my client to sent back the project which is causing the problems to me. With the project of my client I was able to reproduce the fault. Furthermore I found all JavaScript file extensions are renamed from *.js to *.j_
After renaming the extension back to *.js the fault message is gone, and everything is working as expected.
What could be the reason for remaining the file extension of all JavaScript files? Could it be done by a browser possibly?
Thank you.
The problem was the mail server. Because of security reasons the mail server renamed the JavaScript files contained in the zip-file of the project to *.j_
Related
JSP page is not loading after login. same set up is working on Quality system but trying to clone on another system its not working.. guessing the images files path are not reachable in custom project. getting 404 error.. using web sphere server & jdk 1.8
From just your original description it is hard to say what might cause the error, but then if you have reason to believe an image path isn't reachable can you test that theory by logging into the system and seeing if you can access the directory in question. Generally, whether an error in JSP is caused by a compile error or a runtime error, there should be a message or exception in the server log showing more information what went wrong.
The Problem:
I edit an asset file such has .js or .css via my code editor Sublime Editor 3. I then save those files to the server via an SFTP plugin on sublime. Then when I refresh the live website to view changes from my chrome browser (I have a plugin that flushes the browser cache so I see new changes.) I sometimes get a error on the chrome console that reads:
net::ERR_HTTP2_PROTOCOL_ERROR 200
Where the browser is not served the requested file. When I check my log file for Apache I see the following:
[alert] 657967#657967: *188534 pread() read only 7497 of 7498
My server is setup with Nginx running as a Web Server and Reverse Proxy for Apache.
How can I make it so that Nginx does not fail server the requested files even though they were just edited. Maybe sending back cache until it updates the new changes. Please advise because it is driving me nuts and I have no idea how to overcome it.
My workflow for JavaScript consists of me writing code and refreshing the live site to view web console on chrome. I need to be able to view the changes I made from the server via browser. I don't like local environments. I tried to google this topic many times with no luck so any help would be much appreciated.
I am trying to link an external javascript file to my HTML file. But as soon as I run it my console shows this error "Not allowed to load local resource". I read about its cause but can anyone help me with how to fix this?
my statement:
"
"
I have tried using a static web server extension in Chrome but it's not working.
When it comes to debugging code, opening it from disk by "double clicking" the HTML file is rarely a good idea. Try using a local server instead. There are a lot of great ones available. I don't know what IDE you are using, but VSCode has Live Server for example which works great, or you can use XAMPP as a standalone solution.
Don't enter full path of image..
Example: DO NOT ENTER LIKE THIS : C:\Users\A1\Desktop\vs\images\cloud.png
Enter LIKE THIS : iamges\cloud.png
just ensure that your folder named images is inside your project folder
My live server on visual studio keeps opening an old html file when i try to open my current one. Ive tried reinstalling the extension but its the same problem. Can anyone help please
i cannot have two project folders with an html file running through the live server. Only one html file can be streamed at one time other wise when trying to stream the second, it will stream the first (Like the issue i was having)
I was having the same problem but later on I find out that, I renamed my project folder while my server was still loading the same project but with the previous folder name so I changed the link to my new folder folder name and it worked for me.
I have live server will simply not work if there was an error in JavaScript file.
Even if you do an alert in the beginning of JavaScript file (for test purposes) but at the end of the file re-define a variable which was already defined before, this error will render liver server not working.
The html page will not respond as well.
Solution is to go to developer tools (F12), see the errors on console, fix them and save and the live server would be back in action! At least that was the case with me.
I had the same issue, sometimes it was an error on the console, or keep showing an old HTML, tried everything, deleting cookies, reinstalling everything and nothing worked,
Eventually, it worked with a hard refresh, what it really worked was to
Go to ---> vs code settings ----> extensions ---> live server config set as chrome private. So far no more errors!
The liveserver extension serves static pages like html files and it does not load javascript or typescript files. You need to setup a server yourself for example in react you use webpack to configure your local server and your app runs on a localhost:port. In a nutshell, you need to write a script for node to run your js files. And you won't need liveserver after that.
It's quite hard to explain the problem I'm facing but I will try.
As the title suggests, I'm getting a wrong MIME type error on some javascript files that my website sources from. I didn't have this problem before. Funny thing is, it goes away and comes back on its own. I heard that it has something to do with Chrome's recent change due to security.
The error says my script type is binary/octet-stream when it should be application/script. So I added the type="application/script" to all the script references but the error still remains.
As far as the project environment goes, I use Babel to manage my website along with Gulp to run tasks and I use Amazon server to host the site and push it through Github.
I wonder if there is a way I can explicitly configure MIME type in a Babel project or configure something on Amazon server side to adapt to the recent Chrome change.
I don't know if this is enough detail to go about this problem so please let me know if you need more info. I've been googling for a while but haven't quite encountered a case with my exact settings.
It has nothing to do with the type attribute of your script.
Content-Type is a header sent from the server to the client when you request a file. It tells the client what kind of file it has requested.
A few months ago, browsers would simply assume any url in a script's src was a Javascript file. It recently became a requirement that that those files have a Javascript content type. (The content type has nothing to do with the file extention).
Github is not a CDN, you should not be linking to Javascript files from Github in your pages. In order to prevent people abusing their servers, Github (and others) now serve their raw Javascript files with a plaintext content type (except on github.io).