ExtJS: Empty File Name (only .js?_dc=20181..) - 404 Error - javascript

For a long time I keep facing with this problem and unfortunately sencha forums is not helping anything about. Therefore I had to bring up here.
I'm try to developing a simple weather panel. During displaying application on localhost environment it works all good but when it goes to live version it gives this error below and whole application is not working;
GET http://www.myapp/.js?_dc=20180112155627 404 (Not Found)
fetch # (index):89
fetch # (index):99
loadSync # (index):103
load # (index):103
loadEntries # (index):95
processRequest # (index):85
loadSync # (index):85
load # (index):85
As environment we are using Jenkins and classic toolkit during release version and this is Jenkins' commands;
Started by GitLab push by nengin
+ sencha app build classic
I've used Geolocation feature for weather panel but because of this problem I thought it keep raises error so I've take it out but still application keep give this error. On sencha forums they've suggested to me
it happens because of a missing file/ required file. Use sencha app build testing to find out which file is missing. As well comment modern toolkit statements on app.json to avoid errors related with unnecessary classes.
Well.. I did all but still if I'm not disabled weather-panel item on Dashboard class and push it to repository, Jenkins takes commit and build the live version to internet. And keep gives this error above!
Below you will find some code snippets of weather-panel, what could exactly be the reason for this error? I really need some idea.
Here is whole code blocks of weather panel # http://www.text-share.com/view/b53bd4fd
Thanks in advice.
UPDATE
Through #Alexander's comment:
So I've got this WARN on console: [W] [Ext.Loader] Synchronously loading 'Ext.data.proxy.JsonP'; consider adding Ext.require('Ext.data.proxy.JsonP') above Ext.onReady bootstrap.js:867
I've used JsonP on weatherdata class and it doesn't include JsonP inside requires. Now I've added JsonP and now the WARN is gone! So will it run without empty-file error on server with compiled application?

#Alexander 's comment has been the solution;
Please open the browser console, then work with the uncompiled app like it were the compiled app, and check for any occurrences of "Synchronously loading ..., consider adding ..." warnings. Make sure to fix all these warnings, because they cause the issue.

Related

What causes NextJS Warning: "Extra attributes from the server: data-new-gr-c-s-check-loaded... "

I'm getting the following warning from my NextJS Application:
**Warning:** Extra attributes from the server: data-new-gr-c-s-check-loaded,data-gr-ext-installed,cz-shortcut-listen
I don't know why it happens, what is the explanation for this?
This is usually caused by an extension installed in your browser affecting your application passing these extra attributes when code is executed there, most likely it is a language extension so if you have Grammarly or LanguageTool or any other extension similar, try disabling/uninstalling it.

Proxy authentification required on script tag REACTJS

First time posting here so don't hesitate if you need/I forgot something. I looked everywhere and didn't find my answer (I guess I'm missing something).
My problem:
I created a REST SpringBoot application and put an index.html in resources/static to create a REACT front end (I don't want to use nodejs, maybe webpack if I really have to).
When I contact localhost:8080/ I end up on my index.html but those scripts:
<script src="https://facebook.com/react-15.2.0.js"></script>
<script src="https://facebook.com/react-dom-15.2.0.js"></script>
needed to make REACT work provoke a Proxy Authentication Required error in the console log.
I am indeed behind my company's proxy. My IDE (IntelliJ) is configured with this proxy. My JVM takes those arguments to make it work:
-Dhttp.proxyHost=myproxy -Dhttp.proxyPort=myport -Dhttp.proxyUser=myuser -Dhttp.proxyPassword=mypwd -Dhttp.proxySet=true
and the application.properties has the following line:
server.use-forwarded-headers=true
I don't know what I should configure anymore to make it work. Do you have any ideas? Thank you very much in advance!
EDIT:
Facebook is a bad example as the proxy won't let me go on this site. I have updated my src to authorized sites (tried them on my browser and they worked). Still, I have the same error: 407 Proxy Authentification Required
I found the solution:
The error is legit. This is the HTTP protocol. First I have the 407 error asking for the informations of my proxy, then those informations are sent throught a second request. Still, showing an error in the log is disturbing.

Google Sheets API node.js quickstart won't work: The API returned an error: Error: unauthorized_client

I've been messing with the Google Sheets API for a project and everything has been going pretty well. I followed all the steps On this page and got the quickstart working great for a while... Until I ran into an issue where I was getting the error message API returned an error: Error: The request does not have valid authentication credentials.
To resolve this I tried a bunch of different things from changing the SCOPES variable to commenting and uncommenting out things.
Eventually I deleted the project and credentials on my google developers console account and tried to make a new one.
Whenever I start a new folder from scratch, make a quickstart.js file, install the node modules and run it, now I get The API returned an error: Error: unauthorized_client. I've made completely new client_secret.json files and made the quickstart.js from scratch directly using the quickstart walkthrough code and it won't work. What could be causing this?
Link to github (this is the code that WAS mostly working until I tried to delete rows from my google sheet after copying data to my sql database).
You may want to try what was done in this SO post wherein this hidden file has been deleted:
/Users/user/.credentials/gmail-nodejs-quickstart.json
In your case, you need to locate the path of sheets.googleapis.com-nodejs-quickstart.json then delete.
For this, you might need to also do a console.log to locate the correct path.

.htaccess configuration for HTML5 History API

After several days of digging at the HTML5 History API, I found this great working example that suits my needs https://github.com/pinceladasdaweb/html5-history-api
However, when trying to run it on my local server/web hosting, I get an Internal Server Error, which leads me to think that there's something misconfigured in the .htacccess file.
Looked up at the Apache Error log and confirmed my theory, this was what error line tells:
"[...]
.../html5-history-api-master/.htaccess:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a
module not included in the server configuration"
I'd like to know if I need to make specific configurations in the server to make the example run properly.
You can see a working demo done by the owner here: http://www.pinceladasdaweb.com.br/html5-history-api/
Any help will be really appreciated.
Thanks!
This is what I have done to make it work.
1- As Panama Jack said in the comments, the answer of what was happening was in the log file wamp\logs\apache_error.log
[...] /html5-history-api-master/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
2- I enabled the rewrite_module on my local server (see Hardik Thaker for your visual reply to this post!
3- My web hosting is GoDaddy, I found out that I had to tweak the .htaccess file to make it work. This last post saved my life!
Hope it helps!

Sencha Compile issue while deploying web application using ./make_bootstrap.sh; ./make_compile.sh

Hi I am working on a web application that is implemented in Ext-JS. I deployed the application using Sencha Cmd v3.0.0.250 with command ./make_bootstrap.sh; ./make_compile.sh
No issues during the deployment.
The application can be accessed using the test link //mainApplication/app/index_debug.html or //mainApplication/app (accesses all-classes.js) url....
When the app is deployed it compresses all javaScript files into one file which is all-classes.js. The deployment was successful. But when I access the app from the url ://mainApplication/app/... it shows the following error:
Uncaught TypeError: Cannot read property 'dom' of null all-classes.js:1
Ext.define.initContainerall-classes.js:1
Ext.define.renderall-classes.js:1
Ext.define.doAutoRenderall-classes.js:1
Ext.define.showall-classes.js:1
(anonymous function)all-classes.js:1
TableManager::findTables() content.scripts.c.js:11
However if I access the app using ://myApplication/app/index_debug.html, it works fine. This is for testing purpose and it loads all js files individually unlike accessing through all-classes.js
I have browsed through the web for similar error. But haven't found any at this level. If the application is accessible through index_debug.html why would it not be accessible with the same javaScript files but compressed?
The compressed all-classes.js obviously removes all whitespace and hence it is just a one line code when formatting (using Sublime Text's JSFormatter package) becomes thousands of lines. Since it was one line I couldn't find what the browser is complaining about. I formatted the code and ran the application. And found exactly in which line it failed. It was pointing to an anonymous function. Once I remove the function the app started working... So the tip here is to format the compressed code when debugging in firebug or chrome developer tool.

Categories

Resources