Javascript not working on all Heroku pages - javascript

I have a Rails 4 app that I am deploying to Heroku. The asset pipeline seems to be doing its job and minifying the js file. Everything works fine in development. After I push to Heroku, the js file will only work on certain pages. I am doing a the same AJAX PUT on multiple pages, and on some pages it works fine, other pages I get a 404 error.
PUT http://thawing-thicket-4506.herokuapp.com/scouts/1/reqs 404 (Not Found)
Here is the filename: application-5f31b026bf954dbd536069113d4c4345.js and the version appears to be the same for both pages using the file.
What could be the cause of this? Any help would be great. Please ask for any other info that would be helpful.

I had some data-attributes messed up. It was erroring out on the server and returning a 404. I started to get the same error in my dev environment and was able to follow the stack trace. Thanks for the help.

Related

Failed to load resource: the server responded with a status of 500 (.)

I used the render site for using my project as a live server and also used the vercel site for deploying my project.
Everything should be alright there is no error, but when I click my live server site name and run it, it shows an error which I give a picture of this issue.
What should I do next to solve this problem? I already recheck a couple of times and Everything goes alright
HTTP status 500 mean Internal Server Error. You should check your server error log.
Some resources for example images or js or CSS files not found. Probably after unloading the project in the live server. Some photos, js, or CSS file paths are not found or are not readable.

Vue-Router not loading component

I am developing a website using Vue and Vue-Router in local. Then I commit changes with git to the production server and the site files get updated.
I was making a payment status page and it's working perfectly in local, so i uploaded the changed to the production server but for some reason the component isn't being loaded on the production server. I am getting no errors.. The rest of the routes I made (were always and are still) working fine, but the new routes I made/make dont in production (again, working perfectly locally)
Does anyone have any debugging suggestions to try and figure out whats happening?
I fixed the problem, It had to do with caching

Fix for : System.Web.HttpException: The file has not been pre-compiled, and cannot be requested

We published our website and everything worked fine. After few days, something strange happened. we're getting "The file 'xxx.cshtml' has not been pre-compiled, and cannot be requested."
Resetting application pool, even restarting IIS didn’t help us to resolve the problem. Even resetting the Web server machine didn't fix the problem. but when we re-copying the published files again, web site starts working again.
We compared the problem website files with the new files, all are the same. nothing is missing. so every two-three days, we are getting the same error and the only way we can fix it is recopying the files again.
We even copied website when we got an error and then create another website based on those files and it works fine!
Any suggestion what can cause this problem?
Thanks in advance.
About the error
System.Web.HttpException: The file has not been pre-compiled, and cannot be requested
This error will come when a reference is specified in web.config and
deployment folder/site does not contain these dlls installed in the
system or bin folder does not contain them(if they are private
assemblies). For Example: (add assembly="Namespace1.NameSpace2,
Version=x.x.x.x, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/)
if your web.config contains any assemblies like this and deployed
server doesnot contain these assembiles in bin or GAC, then this error
will occur.
Scenarios:
Here are some possible scenarios that will generate this error:
When we publish the website with the "updateable" check OFF and then
copy some files on deployment location that has some markup or code in them. By
putting the "updateable" check OFF we instruct the asp.net compiler to compile all the markup and code into dll files so that further on asp.net would not consider runtime compilation of content. But if it needs to (due to the presence of such content) it will throw that error.
The second situation is when we have a web application configured in
VS.Net to run directly off IIS (the http project) and then we publish it to the same location again with the "updateable" checked OFF. There will be development files at same location which will cause similar errors.
Another situation is where we have a precompiled website and within the
root folder of it we have another folder that has content for another asp.net
application but isn¡¯t marked as application in IIS. ASP.Net tracks asp.net
applications when running on IIS by virtual directories in IIS marked as applications. A child folder having un-compiled content within a parent
application which is precompiled will again cause this error.
Source: Microsoft Support
Apparently, it is another scenario where the cause is related to missing ReportViewer .dll references
Solutions
Some people talks about adding manually the missing missing assembly files.
i found out one thing that while publishing the application it does
not copy all of the dependent assemblies in the bin folder.So i just
copied them manually to the server and now every thing is working
Other people, somehow fixed this installing "Microsoft Web Service Enhancements v3.0". Downlaod here. It probably provides missing required .dll
Here, somebody fixed it, enabling "Create a separate assembly for each page and control output" in the Deployment Options

Symfony asset cache not working in production

I have been working on a Symfony application which is hosted on AWS. It seems that my image cache is not working properly. The system setup is using VichUploaderBundle, Assetic. I would like to mention I have this application working perfectly (no errors at all) locally on my MacBook.
The cache directory is in /var/www/myapp/shared/web/media/cache, this folder is 755 (same for its children), and the folder has the owners nginx:ec2-user. When an image is attempted to be loaded, eg. http://myapp.com/media/cache/resolve/login_logo/bundles/appfrontend/images/logos/linear-logo_small.png it does not load the image, nor does it create a directory in the cache to contain the image.
A similar issue is happening with the javascript for the application. Although it looks like the javascript is being loaded (the js is included on the webpages), it seems that most javascript features do not work on production only. Some examples of JS packages that are not working are Zenstruck and Swiftmailer. I am not sure if this is related to the other error we have.
There are a number of other issues also caused from javascript errors. The javascript is working perfectly on the version I have running on my MacBook.
Thanks for you help and suggestions in advance.

SP page deployed, but the content is old

I have a simple setup - SharePoint Foundation Server and Visual Studio 2013 Professional installed on this server. Everything worked fine. Until... I don't know why, but deployment stopped refreshing content on the page.
I have some javascript code on my page (inside aspx page or in external js file). When I change it (e.g. output sth else to console) I still see the effect of some previous build. It looks like deploy operation does nothing. The most puzzling part I think is when I click Debug button. One would expect it to work at least there. But it doesn't.
Two other developers working on the same environment (same server) have no problems with changing their JS code.
The only hint I have is this error msg:
0x80070005 - JavaScript runtime error: Access is denied.
I see it when I run Debug from VS. It is thrown at line if (!IsNullOrUndefined(window.localStorage) && IsNullOrUndefined(window.localStorage.SPAnimationEnabled)) of core.debug.js file from SP core.
Can anyone help me? I don't even know how to google it :s
Oh, I should also mention that I did clean and rebuild all but nothing helped. Also there are no errors thrown - either on VS output or in event viewer.
The project was under svn, so I fixed it by checking out to other directory. And it works just fine. I guess it had sth to do with permissions.

Categories

Resources