When I open any route in new tab or another blank screen it work perfectly in local host and debug mode
but when i build web and upload this build on any server and try to open this route in new tab also or new screen or hard refresh the same tab i already open and works on it , it give this error
so any one has any solution because i searched many many times and nothing i had to do
I work with go router package to handle routing but nothing work
Related
I am working on a personal project for my portfolio and I'm completely stuck.
I have an Angular 14 app I've been working on. The stack is PEAN. I currently have a live version of it hosted on Heroku. The issue I'm running into is that in my local development version of the app, everything works as intended, however on the live version on Heroku, If I refresh the page using f5 while on the main backlog page, it does not refresh, and instead shows a blank page with "[ ]" at the top of the page. Every other part of the app functions fine, and it does not fully crash when I run into this issue. If I type a different URL in and go to that page, it works again. If after doing so, I click a link that loads the crashed component, it will reload just fine. It appears that the component only breaks if I refresh the component with f5 (or clicking the refresh button on chrome).
I've been working on this for a long time and I think I've narrowed it down a bit. So far I've:
confirmed that my express server is serving my static HTML files from their folder correctly
added a catch all code block at the bottom of my express file to redirect to index.html
made sure that Heroku was actually executing my server.js file
removed potential offending portions of code, like auth/error interceptors and newly added Google Sign-in
I've also:
checked with various browsers/mobile browsers
checked for console errors (there are none)
checked network tab on refresh. (just shows a 304-OK response)
checked Heroku logs. No errors there either.
The issue can not be recreated locally, and it only happens on refresh of one component, the Backlog component.
If there is any more info I can add please let me know, I'm hoping this is a regularly encountered issue. I can't seem to find anything that specifically deals with my exact issue by searching. Any help is greatly appreciated.
update
The blank page with "[ ]" appears to be my database's response when hit without a user ID to check against, and return data. I've narrowed this down to an HTTP-INTERCEPTOR that injects the user ID into the headers, which the route that would use that info for the DB wouldn't have. This makes my DB return "[]".
The only thing I don't understand is that this happens only when hosted on heroku, and not locally.
I have set up a wiki.js project on the server and am writing a plugin. While this plugin is running on the server where the project is installed, it cannot be accessed from my own computer. For example, when I want to open a file, it opens on the server computer, not on my own computer. I do these operations with puppeteer and use the page.pdf feature. How can I fix this problem? I tried to access the url of the page, at least, maybe it will return a result, but when I access the window properties with node.js, the result returns blank. I tried window.location.href
I am getting the following error message when I try to view an azure website I created: 'You do not have permission to view this directory or page.'
When I click on the URL I created in Microsoft Azure, it also disconnects me from the FTP that I have set up with this error messsage: 'Disconnected from server: ECONNABORTED - Connection aborted' I thought I fixed this setting by going into Filezilla FTP Settings and changing it from Passive to Active
I don't know if these things are related to each other or causing one of the things to happen, but I don't understand what to do or what is broken?
Update: I got the error message 'You do not have permission to view this directory or page.' to work by changing the name of my html file from 'index2.html' to 'index.html' but it isn't playing my html file correctly. It has changed into a small black box, rather than filling up the whole screen and it is just a black box with a play button, but it doesn't play.Azure website
I fixed it. I uploaded my video to Wistia and then added the Inline Embed code to my index.html file, then added my files to Filezilla, and then the hosting site from Azure finally worked.
I am glad you fixed the issue. If you see the issue again, could you please restart the website and check once.
For testing/debugging purposes you can turn on the Azure detailed messaging, and turn back off when its ready for production. To do so, you have to follow these two steps,
Login to Azure > App Services (left side menu) > Your Web App > Diagnostics logs (search box is at the top if you can't find it), then turn on Detailed Error Messages or turn on all of the loging options, up to you.
Now add the following in your Web Config file,
In your Web Config file add BEFORE system.web closing tag, . Similarly, add BEFORE . Finally, upload the Web Config to Azure and cross your fingers.
If you follow the steps correctly, that will show the error messages in detail and hopefully from there
I am trying to run the XSockets WebRTC example found here: http://www.nuget.org/packages/xsockets.sample.webrtc
The package installs and displays index.html, however the websockets server does not appear to start. This seems to work since I renamed the CustomBroker to CustomBrokerController.
A couple notes:
1.) I am running Visual Studio 2013 which appears to self host apps under IIS Express only. Per the application readme file, I should be running under Visual Studio Development Server:
Right click the project and select properties.
Under the "Web" tab go to the "Servers" section and set Use Visual Studio Development Server
Is this a problem, if so - how to fix it?
2.) index.html contains this line: conn = new XSockets.WebSocket('ws://127.0.0.1:4502/Broker');
There is no controller named "Broker" in the controller subfolder under the WebRTCSample folder. Though the remote and local video seems to work, none of my breakpoints are getting hit on the CustomBroker controller. Now I noticed that the CustomBroker class under the controller folder does not have the "Controller" name connected to it as in "CustomBrokerController". I renamed it from "CustomBroker" to "CustomBrokerController" and now I am hitting breakpoints, but on the client index.html page, if I open up two separate windows and pass the same context as querystring the remote video section does not display. The weird thing is that from the console on the client side, I see an object array that seems to hold a list of the connections and seems to accurately reflect the amount of remote connections I have.
3.) I added a XSocketsBootstrapper per the readme file. I added this file to the App_Start folder as per the instructions.
UPDATE:
I created a new project and added XSockets.WebRTC files using the library manager. I hit the home controller to invoke the BootStrapper and the breakpoint triggered. It also hit the breakpoints for the CustomBroker after I changed the name from Broker to CustomBroker. Now, after I refresh the index.html page, none of the breakpoints are called from the CustomBroker. Should this be happening? I would think that when this line is reached in javascript, peerBroker = new XSockets.WebSocket("ws://127.0.0.1:4502/CustomBroker"); the controller events would fire. Am I missing something?
Just to be sure I tried it my self without any issues.
Renaming CustomBroker to CustomBrokerController will do make any difference since the Controller part is a suffix.
Lost you in step 2, will try your exact steps later and let you know the result.
I have found no joy in getting any of the sample programs for Chrome to connect to my Chromecasts.
The Chromecasts have been registered and I am able to browse to their IP address port 9222 successfully.
Both the Chrome browser and Beta extension are up to date.
I have tried the CastHelloVideo-Chrome, CastMedia-Chrome and Cast-Tictactoe-Chrome and all fail to connect. The developer console shows a pair of errors:
GET chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js net::ERR_FAILED
and
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('file://') does not match the recipient window's origin ('null').
When testing our own code we get an error when calling requestSession but the message returned by Chrome.cast.Error is useless since the function and variable names have been obscured.
I also have a difficult time testing the examples for Chrome. I decided to use Chrome to test because debugging JavaScript is so much quicker than going directly to Android. I spent hours trying to figure out why I keep getting the error message GET chrome-extension://boadgeojelhgndaghljhdicfkmllpafd/cast_sender.js net::ERR_FAILED and Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('file://') does not match the recipient window's origin ('null') if I run it from my PC but not when I run it from an example website at http://www.videws.com/eureka/helloVideos/ provided by one of the Cast developers at Google. I keep reading/trying different combinations from his readme note in the example until it dawned on me what he meant by "Put all files on your own server" instead of "computer".
I created a public weblink on my Google Drive, make the folder public and copied all the files there. When go to Google drive on the web, preview the example (index.html), the example runs beautifully. I tried tic-tac-toe. It also runs.
So the answer is you need to run it off a website -- not from a local file in your computer (ctrl-O in Chrome)
I hope this will help you going with Cast.
Danh
I was finally able to get connected, but from Android. Many steps will be the same though.
I tested this: https://github.com/googlecast/CastHelloText-android It let's you speak into the phone, and what you say appears on the TV/Chromecast. I didn't install the formal sender app, but I was able to load the TicTac Toe from the receiver as well. So i have seen them both on my CC.
I couldn't connect until I properly setup the RECEIVER APPLICATION. You didn't mention it.
What I did from where I think you are at.. I just double checked my receiver app settings.
File copy the receiver.hml file provided in the sample sender app. Place it in a public dropbox folder. copy that public link to my clipboard.
Go back to where you registered your Chromecast device(s). https://cast.google.com/publish -Add An Application. I called mine : ReceiverSimple
Edit the app you just created, and for the URL field: paste in that public link. For you, set the platform to Chrome. It did not seem to matter whether or not i included the package name, so try leaving it blank.
Save It. Now COPY to clipboard the ApplicationID for the receiver you just created.
Open the provided sender app source code, and find where it's using APP_ID (hopefully R.Strings or equivalent in chrome ) Paste that App ID in. That will tell your client to use your receiver app, (and therefore, load that receiver.html file into the chrome cast screen).
also try a chrome cast reboot as another means of sanity checking.
I think you're close.