localhost MAMP with the shared database: Error - "This site can’t be reached" - database

I have a copy of MAMP installed on my iMac and on my MacBook Air and they share the same copy of a database through the Dropbox. And all worked fine just until now.
I think I got into my MAMP on one of my computers without waiting for the core files to be synchronized and maybe that causes conflict.
Now if I go to the localhost page I get
Forbidden
You don't have permission to access / on this server.
And if I go to any of my dev domains, for example, example.dev I get this
This site can’t be reached
example.dev refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
Hope that someone who is more experienced in this field could tell me what may have happened and what do I need to tweak to restore it back.
Thankful in advance!

The answer was much easier than I was thinking about. The whole point is that Chrome doesn't support dev extensions since the version of Chrome 63 (out since December 2017) that's why this problem occurs.
Found the answers in these threads:
Stack Overflow Similar Question
Chrome 63 forces .dev domains to HTTPS via preloaded HSTS by Mattias Geniar
Don't Use .dev For Development by Danny Wahl

Related

Localhost windows10 took to loong to respond

Hi I'm Surya I'm facing this localhost took to long to respond in my windows computer I thought the problem was with react and again it happened in the expo so it is a problem in my computer
enter image description here
enter image description here
it also compiled successfully I tried disabling my firewall and my antivirus(Quick Heal) and my antivirus is not yet expired everything is good but I do no what is the problem please help me with this problem .
The issue is mostly caused by firewall or antivirus. Re assure that you have disabled antivirus software and firewall. Also, check the network connection and ensure that you are not connected to proxy.
After performing all these, try restarting the system.
I finally solved it the problem was with my antivirus I added localhost to be allowed in my quick heal antivirus now everything is good.
Again the problem started this weird I do no why I ran Windows troubleshooter it gave me this error
the remote device won't accept the connection localhost

pgadmin 4 v4.28 keeps loading

I installed pgadmin 4 v4.28 and it keeps loading but does not open, I tried opening it as administrator and it still does not open. I had the older version previously but I have deleted PostgreSQL DB and pg admin properly before I install the above version. can you guys help me out on this? the link I have the screenshot of the problem.
Do the following steps to resolve this:
Open your registry editor.
Change the value of HKEY_CLASSES_ROOT\.js\Content Type from text/plain to text/javascript.
Restart the pgadmin server. You can do this by ending the pgadmin background task from the task manager.
UPDATED ANSWER
PGAdmin has been tracking this as bug 5996. In it, they recommend the following solution:
You can add the following lines to the "config_distro.py" and
restart the pgAdmin 4 server:
import mimetypes
mimetypes.add_type('text/javascript', '.js')
The above workaround should work for you.
They also mention:
In the next release, we're looking to include that into the code, so
users don't have to do it themselves.
But the answer to your question, the config_distro.py can be overwritten
in the subsequent upgrades.
pgAdmin does provide another option to set the settings in the
config_system.py file which is intended for system administrator to
include settings and which is outside of the pgAdmin installation.
Please refer https://www.pgadmin.org/docs/pgadmin4/4.28/config_py.html
for more details.
PREVIOUS ANSWER
Another answer had comments asking what caused this/how the author figured it out.
For posterity, this is documented in the FAQ:
When I launch pgAdmin 4 v4.28 or later on Windows, the loading page
never closes. Why?
pgAdmin 4 v4.28 includes additional security features, one of which is
intended to prevent security issues caused by Content Sniffing.
Unfortunately some Windows systems are misconfigured such that this
causes Javascripts used by pgAdmin to fail to load. Opening the
developer tools on your browser will show an error similar to this:
> Refused to execute script from
> 'http://127.0.0.1:57313/static/vendor/require/require.min.js?ver=42800'
> because its MIME type ('text/plain') is not executable, and strict
> MIME type checking is enabled.
>
> (index):39 Uncaught ReferenceError: require is not defined at
> (index):39
This will occur when the value of the registry key at
HKEY_CLASSES_ROOT\.js\Content Type is set to text/plain. To resolve
the issue, use the Registry Editor and reset the value of
HKEY_CLASSES_ROOT\.js\Content Type to:
text/javascript
Finally, restart the pgAdmin server.
Interestingly enough, GoLang, TensorBoard, Django, and many others have had issues filed regarding this same problem. Browsers are refusing to load content because the browser thinks it is being transferred as 'text/plain', based on the registry configuration.
Edited on 25 May 2022 (New Link for pgadmin4 download)
You all have great answers...but then on the experience i just had, the simplest way, which worked for me right away is to install the new version of pgadmin4 without necessarily uninstall the existing one.
That is what i did and i was able to still see all my databases and tables unchanged and untempered.
Just run the installation and you are good to go
You can also downgrade your PgAdmin. I didn't want to change anything in registry editor. So I downloaded and installed pgadmin4-3.6. It works fine on Windows 10 (x64).
I just upgraded PG Admin from v4.28 to V4.29 and it resolved my issue. One can download the latest version from here for Linux, here for Windows and here for Mac.
This is similar to vialy's recomendation. Thanks Vialy's for your input it save my day... :)
I had the same issue with pgAdmin 4.28 using Chrome Browser on windows 10. It started working after I switched to Edge Browser.

Installing Gears in 2012

For one of the customers of my company, I have to get Gears working. To explain briefly, they have a site using the Gears local database and now want to really use localStorage (at least for browsers supporting it and still use Gears for the old ones).
To refactor the code and ensure that the HTML5 version works as the Gears version used to work (and that I do not break the existing system is also a plus). And here comes the problem: Gears is not supported anymore and seems unable to install.
My dev' machine is using OSX Snow leopard. I tried the Gears custom installer made by the authors of MailPlane (http://mailplaneapp.com/download/google_gears/) to enable gears on Safari. The installer runs without any issue and I have a "Google Gears settings" entry in Safari's menu. But the code does not work, here's the console output for the database creation code:
> google.gears.factory.create('beta.desktop')
Error
line: 2
message: "'undefined' is not a function (evaluating 'google.gears.factory.create('beta.desktop')')"
sourceId: 419639712
__proto__: Error
(this is the code I got from the customer).
In the console, when I try accessing the Gears factory, I just get a simple html object:
> google.gears.factory
<object style=​"display:​ none;​ " width=​"0" height=​"0" type=​"application/​x-googlegears"></object>​
In Gears preferencies, there's a site of sites for which I can allow Gears to run, but I can't add localhost there (I can't add anything in fact).
As I can't get Safari/Gears working, I decided to setup a WinXP virtual machine, maybe it would work here.
I was able to download the Gears installer. But this one needs file that have been removed from Google servers (at least I guess, but I don't have any firewall installed so I don't see what could block the installer when getting the files ...).
I also tried old Chrome installers (apparently Gears was shipped in Chrome 12-) but none of the installers work (they just, well, do nothing. I even tried to start them from the command line to expect a bit of output but I got nothing).
Another option would be to get a Firefox gears add-on, but they all seem to have disappeared :/
So, the question (finally): does anyone here still have to use Gears and how do you get it running on new machines ?
Cheers,
Vincent
I think The Google Gears API is no longer available.
Please see https://developers.google.com/gears/ page.
Thanks,
Jigar

Debugging Silverlight applications with IE9 beta

I spent some time debugging a SL3 application with VS 2010 in IE9 beta today and noticed a few quirks. Sometimes when launching the Silverlight app in VS it fails to load in the browser, but refreshing with F5 tends to fix the problem. Also, there are sporadic scripting errors that pop up a debug dialog - these also seem to be fixed by refreshing the page. Has anyone run into these problems and found a fix?
EDIT: My most prevalent error is:
Error: ASP.NET Ajax client-side framework failed to load.
I don't understand why, but someone without a name at the Silverlight forums has found a solution that worked for me:
Just add or uncomment this entry to your hosts file (%SystemRoot%\system32\drivers\etc\hosts):
127.0.0.1 localhost
I noticed this as well with Silverlight 4, but also when I start a simple web project.
IE9 has a shorter startup time that IE8. Debugging a Silverlight application starts the development web server to host the http:// site. The time that it took to start up the web server was less than the time to start up IE8 and greater than the time it takes to start up IE9.
#Michael S. Scherotter - It can't be because of the shorter startup time because making the host file change which fixed it for me would have zero impact on app startup time. Something else must be causing the browser and Cassini to not talk to each other correctly.
One other fix, related to the others is to change the StartURL to launch to the loop back address directly, rather than editing the hosts file. So, in one app, I've got this as the start URL:
http://127.0.0.1.:60525/
Of course, to make this work consistently, I've selected a "specific port" in configuration, as 60525 in this case.
(the trailing . after the loop back address is to allow Fiddler to do its magic).

Google App Engine Dev Server Logs Location

Really simple question. I'm on Ubuntu 9.04 (I'm new to Ubuntu) and I can't find the dev server logs for GAE. Could somebody tell me where they are? Googling hasn't returned any result.
I think I had the same question, and got an answer: Where does GoogleAppEngineLauncher keep the local log files? (It's a Mac, not Ubuntu, but otherwise the question seems to be similar.)
In short: it turns out that these logs are not saved to a physical file but you can modify the source code to get this result. Details are described at the above link.

Resources