generator-teams
generator-teams copied to clipboard
NGROk Authentication Error
Description
Running Yo Teams Generator v4.00, NodeJS >16.00, free NGROK with authentication token applied within ngrok
yo teams framework created, gulp manifest, build, and serve all fine and tab shows up in local host
gulp ngrok-serve runs well, slowly but well delivers message [ERR_NGROK_6022] which is a requirement to have an Enterprise account with ngrok...!!! Is this correct, or should it run with the token and free account. This is not part of the documentation
.
Steps to reproduce
gulp ngrok-serve
Expected results
Expected to see app
Actual results
ERR_NGROK_6022 displayed in browser
Project you experience issues with
yoteams-deploy
generator version
4.0.0
build tools version
1.7.0
nodejs version
16.5.1
npm version
8.11.0
Operating system (environment)
Windows
Additional Info
Nice form, useful and easy to provide all the right information..!!
Thanks for reporting, we'll take a look at it and come back to you with a profound answer as well as an update doc
Just wondering how you are getting on with the this bug / documentation issue?
What have you specified in your .env
file NGROK_*
variables?
I haven't, I was simply following the documentation, and it was not written that I had to. --- Should I add my authcode??? However, in the .env the following
NGROK configuration for development
NGROK authentication token (leave empty for anonymous)
NGROK_AUTH=
NGROK sub domain. ex "myapp" or (leave empty for random)
NGROK_SUBDOMAIN=
NGROK region. (us, eu, au, ap - default is us)
NGROK_REGION=
Sorry, didn't realise it would do that Snip below for accuracy
of reading
The intent of gulp ngrok-serve
is to either a) create random domains without any ngrok auth or b) use a user defined domain with ngrok auth populated in the .env file.
If you prefer to use ngrok, that you manually configure - that is using the ngrok CLI - it is recommended that you do so by running the ngrok CLI in a separate console window and just use gulp serve
.
I am a little confused, following the documentation I do not get the final result as communicated, by the documentation, I will get. Are you saying the documentation needs to be updated and provide a solution, or I have to find some different documentation to move past this impasse. I am not trying to sound rude, although it is possibly coming across like I am, I just want to learn how to build a Teams tab using the steps Microsoft Documentation tells me I can use, and get the results they tell me I will get, even though I am not a programmer / coder.
What documentation are you following? Have you followed this one: https://pnp.github.io/generator-teams/tutorials/build-your-first-microsoft-teams-app/ Also, when trying that tutorial, please remove any global ngrok configuration you have.
I initially started out using the Microsoft documentation here (https://docs.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/create-channel-group-tab?pivots=node-java-script) and was forwarded to the URL above --- it is from the Yo Teams - Microsoft Teams Apps generator where I am reporting these issues from.
ngrok is very new to me, introduced during these sessions, how to remove any global ngrok configuration.
Thanks @StickyKnowledge - you said in the initial question post that you used the ngrok authentication token, that's why I asked - and that's what I ask you not to use. Either use ngrok-serve
without any ngrok configuration or use the .env
file with a token and registered sub-domain.
In the error based on the original question there is an ngrok error message 6022 which appears instead of the tab stating there needs to be an ngrok authcode applied, presumably to the the original ngrok download, which had already been applied before my original run through of the PNP documentation and using gulp ngrok-serve. Therefore the ngrok authcode is applied to the ngrok alone.
If I add the ngrok authcode to the .env it provides a another ngrok error message, 3200 no tunnel found, after using gulp ngrok-serve. If I just use ngrok serve, without the gulp, vs2022 says the command is not recognised. Hence my confusion.
If I add the ngrok authcode to the .env it provides a another ngrok error message, 3200 no tunnel found
This requires you to also register a sub-domain in ngrok and specify that sub-domain in the .env
file
If I just use ngrok serve, without the gulp,
You should use gulp serve
if you're manually setting up ngrok
vs2022 says the command is not recognised
Are you running this in Visual Studio?
@wictorwilen, yes I am using Visual Studio 2022. I knew about the gulp serve, but I wanted to look like I knew at least one thing as I have been trying to get around this quite some time now...!!! I did not know about the sub-domain in ngrok and the .env file, these were not mentioned anywhere, where can I get info on this.
@StickyKnowledge check this documentation: https://github.com/pnp/generator-teams/tree/master/packages/yoteams-build-core#using-ngrok
Closing this issue because of inactivity. @StickyKnowledge Let us know if you need more help.