importScripts in service worker - service-worker

I am trying to use IndexedDB through Jakes Archibald's promise-based IDB lib by importScripts but as soon as I select "offline" through Chrome Dev Tools I am getting An unknown error occurred when fetching the script. A funny thing that's happening is that even if shut down my localhost server my app works fine (I have the browser cache disabled through Chrome Dev Tools) on my service worker installed browser but on another, of course, it doesn't.
I've looked into these https://www.w3.org/TR/service-workers/#importscripts, https://github.com/w3c/ServiceWorker/issues/106 resources but I didn't find an fix to my problem.
Any help/explanation would be greatly appreciated.

The problem is likely to be that you've not cached the idb.js file so that the service worker can access it when your app is offline.
Try adding it using cache.add (or cache.addAll if you are caching multiple files) inside your install callback.

Here is a library that i created. It makes using IndexedDB a whole lot easier! completely client-side, no dependencies!
https://github.com/ryanwaite28/promise-db

Related

Neo4j Desktop Fails to Open - Javascript Error

When trying to start Neo4j Desktop, I'm getting a Javascript error. From the looks of it, it seems like the problem is with the desktop client (seems electron based) itself and not the database itself. Anyone encounter something similar or know how I could troubleshoot further? Running Windows 7.
I never managed to solve this exact issue. However, given that neo4j desktop comes with neo4j server, I could start the server no problem and connect to localhost:7474 and access the web interface which served my needs.

Start electron app with admin privileges as default

I created an electron app which can only be started as admin, because it needs it for various command executions. Now it prompts that it must be started as admin.
This question was very helpful.
Now I want to start it with admin privileges right away so windows asks for the acception. It shouldn't be able to start the app without admin privileges.
I tried adding --win32metadata.requested-execution-level=requireAdministrator, but then it writes an error on startup (always):
The application has failed to start because the side by side configuration is incorrect.
How can I achive this with the electron packager?
Your electron-packager code looks fine, and the switch works for me.
This can happen if you are missing Visual C++ Runtimes, or if they're corrupted. Try installing them from here and try again.
If that doesn't help, then you should dig into the Event Viewer, which should come installed on your machine, and see what the specific error is. This page has some additional tips on troubleshooting this issue.

SonarQube Service Starts, Runs and then Stops?

I have a Windows 2012 R2 server and I managed to install the SonarQube 5.4 server as a Windows Service. I also set up a user so the service can actually start without the infamous "It started then stopped" error a lot of people seem to get. Before installing the server as a windows service, I checked that it worked using StartSonar.bat and it did work just fine, so I was confident when I made it into a service.
But when I try to access http://localhost:9000 there is nothing there, and it appears that shortly after starting the service it stops without any message at all. I can't tell if this is because I try to access the site (which gives me ERR_EMPTY_RESPONSEin Google Chrome) or if it just closes down after a short while.
Anyone got any insight?
I'm a beginner. I came across the same issue and fixed it.
Ensure that the database is running.
My log file (located at sonarqube_home_dir/logs/sonar.log) included the following statement.
Caused by: org.h2.jdbc.JdbcSQLException: Wrong user name or password [28000-176]
Since I'm using the default database, I commented below lines
#sonar.jdbc.username=***
#sonar.jdbc.password=***
at sonarqube_home_dir/conf/sonar.properties.
This must happen due to many reasons like connection problems, permission problems so First, you have to see the logs. /sonarqube-7.6/logs$ tailf sonar.log. then you can find the reason. Once I had the same problem so I did like that. my error is something Directory does not exist: lib/jdbc/mysql
org.sonar.process.MessageException: Directory does not exist: lib/jdbc/mysql reason is I uninstall MySQL and remove all folders name contains "MySQL".
just check whether port 9001 already in used, stop it if already in used.

Utidev webserver's windows service not running

im trying to host my website developed in ASP.net4.0 in Ultidev's casini webserver 2.0.
bt when i try to host the same or click on http::/localhost:port, im getting following error.
Utidev webserver's windows service not running.
I dont hav clue on the windows service it's expecting.
Do i need to install any other dependencies ?
Please look at the error pic.
Please help me in this regard.
Thanks.
The host process for that application, DefaultSharedHostProcess, is having trouble starting. Look in the Windows Event Log, as well as "UWS.Installer.log.txt", "RegRepairTrace.txt" and "AppRegTrace.txt" files in the "%ProgramFiles%\UltiDev\Web Server" folder.
As there are a variety of circumstances which can lead to this error, you will need to edit your question and add in the relevant error details you discover from the logs, or go start a thread on UltiDev's support forum. For instance, I encountered this error because of a permissions issue to machine.config in a .NET 4 folder.
Ran into this today, and found if I recycle the host process, I was up and running.
In the UltiDev Web Server Explorer window on the left side, click on the Default Shared Host Process.
On the right side, you'll see a button named "Recycle Host Process". Click it, and answer Yes.
After this, the Windows Service started up, and I was able to communicate with my web app.

Can't resolve "UnauthorizedAccessException" with MVC 2 application running under IIS7

We use MVC controllers that access System.File.IO in our application and they work fine in localhost (IIS 6.0-based Cassini). Deploying to IIS7, we have problems getting the controllers to work because they throw UnauthorizedAccessExceptions.
We have done the following to try to resolve the issue:
- Set NETWORK SERVICE and IUSR accounts to have permission on the files and folders in question
- Ensured the App Pool is running under NETWORK SERVICE and loading the user profile
- Application is running under full trust
- We tried adding impersonation to web.config and giving NETWORK SERVICE write permissions (which was not a great idea because that's not what we want to do)
Now, we alternate between getting UnauthorizedAccessException and an IIS7 404 page that suggests the routes are being ignored completely (for example we serve "/favicon.ico" via a controller when the physical file actually lives at /content/images/favicon.ico). We used ProcessMonitor to try to track down the issue but weren't successful.
UPDATE:
This issue is intermittent. We had a brief few minutes where everything worked without making any configuration changes. We're running on EC2, so this could be related to a distributed file system. We're also using a separate drive to store all web site data, we're not using inetpub/wwwroot.
UPDATE 2:
The site works without incident under IIS 7.5, with no configuration changes needed but this is likely due to running with the new AppPoolIdentity. Otherwise it's an identical deployment. Unfortunately we can't run R2 on this EC2 instance.
One of the ways to identifying the cause is using Procmon tool from Sysinternals
Procmon will show the reason for unable to open the file , it will also show who is holding the file.
The issue turned out to be the controller factory we were using not handling file requests properly.

Resources