Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError in plugin "yoteams-build.core"Bug report: <short description> #366

Open
Migwados opened this issue May 26, 2023 · 11 comments
Open
Assignees

Comments

@Migwados
Copy link

Description

When I'm trying to run 'gulp ngrok-serve' it's coming back with

[14:38:12] Found additional Yo Teams plugin: yoteams-deploy
[14:38:12] Using gulpfile C:\Temp\Bots\Project\gulpfile.js
[14:38:12] Starting 'ngrok-serve'...
[14:38:12] Starting 'start-ngrok'...
[14:38:12] [NGROK] starting ngrok...
[14:38:14] 'start-ngrok' errored after 2.04 s
[14:38:14] TypeError in plugin "yoteams-build.core"
Message:
Cannot read properties of undefined (reading 'body')
[14:38:14] Finished 'ngrok-serve' after 2.06 s

Steps to reproduce

Gulp file is as follows;

/* eslint-disable eol-last */
// Copyright (c) Wictor Wilén. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

const gulp = require("gulp");
const package = require("./package.json");
const argv = require("yargs").argv;
const log = require("fancy-log");
const path = require("path");

const config = {};

// Set environment variables
const env = argv.env;
if (env === undefined) {
require("dotenv").config();
} else {
log(Using custom .env: ${env});
require("dotenv").config({ path: path.resolve(process.cwd(), env) });
}
process.env.VERSION = package.version;

const core = require("yoteams-build-core");

// Initialize core build
core.setup(gulp, config);

// Add your custom or override tasks below

Expected results

Up until about 2 weeks ago, the server name was generated and it worked fine. I did have a problem with Zscaler, but I turned it off and that solved the issue. Zscaler is still turned off, but this issue seems to point more to the scripting than anything else...

Actual results

TypeError in plugin "yoteams-build.core"
Message:
Cannot read properties of undefined (reading 'body')

Project you experience issues with

yoteams-build-core

generator version

4.1.0

build tools version

1.8.0

nodejs version

v18.16.0

npm version

9.6.7

Operating system (environment)

Windows

Additional Info

No response

@iyyoo93
Copy link

iyyoo93 commented May 31, 2023

Facing the same issue with mac as well

@Migwados
Copy link
Author

Sounds like it could have something to do with the previous post, too #364

@PragashVenu
Copy link

Facing the same issue with windows

image

nodejs version v18.16.0
ngrok version 2.3.41
npm: '9.5.1'

@Kowleone
Copy link

Kowleone commented Jun 5, 2023

Same here, I'm following the MS Build Challenge material for MS-600 and cannot progress with the 'Planet bot' excersize on MS learn due to this bug.

@stephanbisser
Copy link
Member

Thanks for reporting this, we'll look into this asap and fix it!

@Kowleone
Copy link

Kowleone commented Jun 9, 2023

@stephanbisser

The ngrok error only happens for me on the 'Planet Teams' app creation excerise. - The first in the MS build challenge content.

The next module for the 'tab' exercise has no issues with ngrok serve! - https://learn.microsoft.com/en-us/training/modules/embedded-web-experiences/3-exercise-create-custom-teams-personal-tab.

However, i noticed another potentail bug (or user error on my part?). The gulp manifest task isn't creating a package.zip for upload via teams.
Screenshot 2023-06-09 173747
Screenshot 2 2023-06-09 173850
Screenshot 3 2023-06-09 173747

I Hope this can be resolved soon as the build challange is on a timer and has only 10 days left. Thanks for your support ;)

@iseliweb
Copy link

Any update on this or any kind of workaround? Any combination of any version leads to the same issue, even using earlier versions of all modules.

@xavierhamel
Copy link

xavierhamel commented Jul 7, 2023

This issue is probably linked with this issue from ngork bubenshchykov/ngrok#309.

The error occurs because error.response.body is not defined (in ngork/src/client.js at line 40). Which means an error occured, you just don't get why the error occured:

          clientError = new NgrokClientError(
            error.response.body, // <---- here
            error.response,
            error.response.body
          );

For me the acutal errors were HTTPError: Response code 503 and RequestError: connect ECONNREFUSED.

Hope this helps!

@xavierhamel
Copy link

After more digging, yoteams-build-core uses ngrok v4.0.1 which does not work anymore because it uses ngrok 2 which is not supported anymore for anonymous user:

Your ngrok agent version "2" is no longer supported. Only the most recent version of the ngrok agent is supported without an account.

I upgraded the package to v5.0.0-beta.2 and added my account and it does seem to work. The npm overrides can be used for that porpuse.

The documentation or the package should be updated accordingly as it does not seems to work as is for now.

@skhemka007
Copy link

upgraded the ngrok package to v5.0.0-beta.2 but still not resolved. Do we have any work-around??

@hpv333
Copy link

hpv333 commented Apr 15, 2024

the upgraded version didn't work for me either , Any other ways?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants