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

testenv issue #82

Open
Fusekki opened this issue Jul 23, 2020 · 5 comments
Open

testenv issue #82

Fusekki opened this issue Jul 23, 2020 · 5 comments

Comments

@Fusekki
Copy link

Fusekki commented Jul 23, 2020

I am following the documentation and have created a testenv file in the same directory as the README file.
I've tried pasting in our correct values, but I get the error below. Finally, I just copied the code from the README and pasted into:

ISSUER=https://yourOktaDomain.com/oauth2/default
CLIENT_ID=123xxxxx123
USERNAME=testuser
PASSWORD=testpass

Yet I get this error after running ng serve:

An unhandled exception occurred: Environment variable ISSUER must be set. See README.md

Not sure what I am doing wrong.

@mrgrape
Copy link

mrgrape commented Jul 28, 2020

I fixed the issue this way:

Check the extra-webpack.config.js file.

const TESTENV = path.resolve(__dirname, "..", "testenv");

You can console.log(TESTENV); then run ng serve and it'll print the file path in the console.

Make sure the testenv file path is correct and it should start working. Changing the value ".." to "." worked for me.

@swiftone
Copy link
Contributor

@staffordp - thanks for the report. Unfortunately, the testenv file isn't yet supported for this sample. See https://github.com/okta/samples-js-angular#running-the-tests - you'll have to export the values as environment variables, or do a work-around like @mrgrape suggests.

@swiftone
Copy link
Contributor

swiftone commented Aug 3, 2020

Internal ref: OKTA-317699

@a-titorenko
Copy link

Hello guys!

Cannot run custom login page example. Got error on Mac:

$ ng serve
Compiling @angular/core : es2015 as esm2015
Error: Error on worker #1: TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
at __read (/Users/kit/Plays/samples-js-angular/custom-login/node_modules/tslib/tslib.js:174:50)
at Object.__spread (/Users/kit/Plays/samples-js-angular/custom-login/node_modules/tslib/tslib.js:193:28)
at Renderer.renderAdjacentStatements (/Users/kit/Plays/samples-js-angular/custom-login/node_modules/@angular/compiler-cli/ngcc/src/rendering/renderer.js:159:63)
at /Users/kit/Plays/samples-js-angular/custom-login/node_modules/@angular/compiler-cli/ngcc/src/rendering/renderer.js:80:52
at Array.forEach ()
at Renderer.renderFile (/Users/kit/Plays/samples-js-angular/custom-login/node_modules/@angular/compiler-cli/ngcc/src/rendering/renderer.js:76:46)
at /Users/kit/Plays/samples-js-angular/custom-login/node_modules/@angular/compiler-cli/ngcc/src/rendering/renderer.js:53:84
at Array.forEach ()
at Renderer.renderProgram (/Users/kit/Plays/samples-js-angular/custom-login/node_modules/@angular/compiler-cli/ngcc/src/rendering/renderer.js:48:54)
at Transformer.transform (/Users/kit/Plays/samples-js-angular/custom-login/node_modules/@angular/compiler-cli/ngcc/src/packages/transformer.js:84:42)
at ClusterMaster.onWorkerMessage (/Users/kit/Plays/samples-js-angular/custom-login/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:195:27)
at /Users/kit/Plays/samples-js-angular/custom-login/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:55:95
at ClusterMaster. (/Users/kit/Plays/samples-js-angular/custom-login/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:293:57)
at step (/Users/kit/Plays/samples-js-angular/custom-login/node_modules/tslib/tslib.js:143:27)
at Object.next (/Users/kit/Plays/samples-js-angular/custom-login/node_modules/tslib/tslib.js:124:57)
at /Users/kit/Plays/samples-js-angular/custom-login/node_modules/tslib/tslib.js:117:75
at new Promise ()
at Object.__awaiter (/Users/kit/Plays/samples-js-angular/custom-login/node_modules/tslib/tslib.js:113:16)
at EventEmitter. (/Users/kit/Plays/samples-js-angular/custom-login/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:287:32)
at EventEmitter.emit (events.js:314:20)
An unhandled exception occurred: NGCC failed.
See "/private/var/folders/jg/0gcvv8pd7c79_wdh7580bsy80000gn/T/ng-4IUd2B/angular-errors.log" for further details.

@oleksandrpravosudko-okta

@a-titorenko this does not seem to be related to the SDK code - does clearing node_modules resolve this? Which Angular version you are using?

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

No branches or pull requests

5 participants