HTTP command not giving me forwarding URLs - ngrok

Trying to use *grok to test out retrieving web hook requests from a third-party vendor, but when I try to use:
ngrok http 5001
I do not even get any UI response from ngrok. I have checked around this site, and other articles, and all of them were getting their forwarding URLs to use.
I tried working with the --log and --log-info arguments, but still nothing outputting in bash.

Okay, I'm on a Windows 10 machine when doing this, and it seems like the Git BASH terminal does not seem to work well. Though, the command prompt did worked well. Perhaps because the file was an .exe might explain it.

Related

Next.jsā€”unable to set up proxy

I am trying to make a blog using Storyblok(v2) and Next.js(v13). I've gone through this exact tutorial before, and I was able to get the proxy up and running multiple times. Here is the tutorial for the blog, and here is what I've been using to set up my proxy (on macOS).
The last time that I went through this tutorial, I was using the same versions of Storyblok and Next. I have no problem at all running those commands re: setting up the proxy, and my terminal does say that it's up and running, https://localhost:3010 -> http://localhost:3000.
When I visit both https://localhost:3010 and http://localhost:3000, I get Error: {"message":{}, "status":401, "response":"Unauthorized"}.
Before I created the proxy, everything was working as expected, so I believe that the errors are definitely related to the proxy. Any ideas on what I might be doing wrong here?

nginx + Xdebug + PhpStorm = 404 error?

The last few days, I've successfully installed and set up Xdebug and PhpStorm to work properly with several remote servers at my new job. However, one server is giving me problems and I'm not sure what I'm doing wrong. The difference between this server and the others is that this is the only one running nginx instead of Apache.
Normally I SSH in to the server, get everything set up on that side, then follow steps in the PhpStorm menu, starting with the validation. This is where the problem is. When I try to validate, I receive the following:
Here are my PHP settings:
I'm not too knowledgeable about Linux just yet so it's possible that I'm missing something stupid, but at the moment I'm very perplexed. I'm able to upload/modify files with PhpStorm so it's not like the program isn't able to get in at all, it's only with the validation and xdebug.
If there's some data you need me to show, let me know and I'll add it when I get back in on Monday.

gapi.auth2.ExternallyVisibleError: Invalid cookiePolicy

I'm trying to add a Google Sign In Authentication system to my app, but I keep getting a strange error that I haven't seen anyone get. I'm using EXACTLY the google example code.
I thought it could be some mistake when loading the api, so I checked the async loading and everything seems to be loading properly, but I keep getting this error in the console:
gapi.auth2.ExternallyVisibleError: Invalid cookiePolicy
I searched everywhere for people with the same problem, but I could not find anything similar.
Any ideas?
EDIT: I tried to create a page with ONLY the code of the tutorial, but the error still occurs.
Well, turns out I was trying to test the API by directly acessing my files locally (index.html). The Google Sign In API only works in a running web server. I started a simple node.js server, ran my app trhough this server, and everthing worked just fine.
As already answered by KoJoVe, you need to run inside a web server. If you are using Python 2.7 you might use python -m SimpleHTTPServer 8000 and then use localhost:8000 on your browser
I've been trying to get a chrome extension to work for a very long time, and I recently decided to click into the error. The reason is because the google platform script checks window.location.protocol (which isn't https for chrome extension) and throws the error 'invalid cookie policy'.
My theory as to why Google won't fix this:
They want to drive people into using paid OAuth2 endpoints
They want to know who received the tokens, if possible (via certificate authorities)
I was having this problem using react-google-login in a create-react-app, and I found that I was accessing the page with http://[::1]:3000/sign_in instead of localhost.
I think google does not like 127.0.0.1 or ::1 since we expose the IP directly or something
When I change to localhost:3000 and it worked.
This worked in my case with python 3:
open python terminal and write the following code:
from http.server import SimpleHTTPRequestHandler as handler
import socketserver as socket
httpd = socket.TCPServer(("",8000),handler)
httpd.serve_forever()

Yeoman doesn't broadcast the test server using grunt serve

I've been looking for quite some time now for this question, but I found nothing.
I scaffold the application using yeoman. I typed grunt serve to launch the application. I tried accessing my computer using the the ip address
e.g.
http://192.168.1.32
It correctly show me the default file in my localhost, which is hello world, now I want to access the one served by yeoman, by adding a port number :9000, but it shows me.
Webpage is not available,
are there extra configurations for this?
There should be no dash in "grunt serve", and that would for the basic generators start the live reload server, which would write output some info on progress in the console, and try to open your default browser when ready.
The server would (again in basic generators) serve at
http://localhost:9000
What is the output from the console when you start the "grunt serve" ?
In case someone asks the same question, you can find the answer by examining the Gruntfile.js which tells you to change the host to 0.0.0.0 if you are planning to test it to other devices.
similar question and solution can be found here

log4net with asp.net mvc - can't watch file for changes

So in a console .Net application I can watch all my log4net events stream by with (the powershell command) get-content .\log.log -Wait which is similar to the linux tail command and I assume uses FileSystemWatcher under the hood.
For some reason, whenever I have an asp.net Mvc application this will not work. To be clear, the log file IS written to. I can get-content .\log.log as many times as I want and get the most recent results, but with the -wait parameter I never see the changes scroll past.
Does anyone have any insight into what might be going on here?
UPDATE: found a working solution for my case, not sure whether this would help you out.
Instead of using PowerShell, I downloaded win-bash and now I'm using this familiar Unix command which works perfectly for me.
tail -f access.log
I'm not that familiar with .Net programming. Could it be a working solution in your case to use win-bash project's bash.exe instead of PowerShell?
I am experiencing similar issue when trying to "tail" Apache access log in PowerShell.
Get-Content .\access.log -Wait
I noticed that when my Apache HTTP server is running, it has a handle open to acccess.log and -Wait doesn't work. Stopping HTTP server releases the handle and when I made manual changes to access.log using text editor my PowerShell window immediately reflected changes in the console.
So I assume if some other program has a handle open to the file, changes are not reflected to console. Unfortunately I haven't found a way around this issue so far.

Resources