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

"Provider not set or invalid" when run it locally #1

Open
vsmelov opened this issue Mar 18, 2019 · 0 comments
Open

"Provider not set or invalid" when run it locally #1

vsmelov opened this issue Mar 18, 2019 · 0 comments

Comments

@vsmelov
Copy link

vsmelov commented Mar 18, 2019

Thanks you for the great example!
When I try to run it, I get this error in JS console

core.js:1427 ERROR Error: Uncaught (in promise): Error: Provider not set or invalid
Error: Provider not set or invalid
    at Object.InvalidProvider (errors.js:34)
    at RequestManager.sendAsync (requestmanager.js:76)
    at Object.get [as getNetwork] (property.js:116)
    at eval (contract.js:487)
    at new ZoneAwarePromise (zone.js:890)
    at Function.detectNetwork (contract.js:478)
    at Function.deployed (contract.js:426)
    at ExchangeService.refreshBalanceTokenInExchange (exchange.service.ts:32)
    at new ExchangeService (exchange.service.ts:25)
    at _createClass (core.js:10915)
    at _createProviderInstance$1 (core.js:10889)
    at resolveNgModuleDep (core.js:10874)
    at NgModuleRef_.get (core.js:12110)
    at resolveDep (core.js:12608)
    at createClass (core.js:12470)
    at createDirectiveInstance (core.js:12315)
    at createViewNodes (core.js:13776)
    at callViewAction (core.js:14210)
    at execComponentViewsAction (core.js:14119)
    at createViewNodes (core.js:13804)
    at createRootView (core.js:13665)
    at callWithDebugContext (core.js:15090)
    at Object.InvalidProvider (errors.js:34)
    at RequestManager.sendAsync (requestmanager.js:76)
    at Object.get [as getNetwork] (property.js:116)
    at eval (contract.js:487)
    at new ZoneAwarePromise (zone.js:890)
    at Function.detectNetwork (contract.js:478)
    at Function.deployed (contract.js:426)
    at ExchangeService.refreshBalanceTokenInExchange (exchange.service.ts:32)
    at new ExchangeService (exchange.service.ts:25)
    at _createClass (core.js:10915)
    at _createProviderInstance$1 (core.js:10889)
    at resolveNgModuleDep (core.js:10874)
    at NgModuleRef_.get (core.js:12110)
    at resolveDep (core.js:12608)
    at createClass (core.js:12470)
    at createDirectiveInstance (core.js:12315)
    at createViewNodes (core.js:13776)
    at callViewAction (core.js:14210)
    at execComponentViewsAction (core.js:14119)
    at createViewNodes (core.js:13804)
    at createRootView (core.js:13665)
    at callWithDebugContext (core.js:15090)
    at resolvePromise (zone.js:824)
    at resolvePromise (zone.js:795)
    at eval (zone.js:873)
    at ZoneDelegate.invokeTask (zone.js:425)
    at Object.onInvokeTask (core.js:4744)
    at ZoneDelegate.invokeTask (zone.js:424)
    at Zone.runTask (zone.js:192)
    at drainMicroTaskQueue (zone.js:602)
defaultErrorLogger @ core.js:1427
ErrorHandler.handleError @ core.js:1488
next @ core.js:5498
schedulerFn @ core.js:4339
SafeSubscriber.__tryOrUnsub @ Subscriber.js:239
SafeSubscriber.next @ Subscriber.js:186
Subscriber._next @ Subscriber.js:127
Subscriber.next @ Subscriber.js:91
Subject.next @ Subject.js:56
EventEmitter.emit @ core.js:4319
(anonymous) @ core.js:4775
ZoneDelegate.invoke @ zone.js:392
Zone.run @ zone.js:142
NgZone.runOutsideAngular @ core.js:4701
onHandleError @ core.js:4775
ZoneDelegate.handleError @ zone.js:396
Zone.runGuarded @ zone.js:158
_loop_1 @ zone.js:702
api.microtaskDrainDone @ zone.js:711
drainMicroTaskQueue @ zone.js:610
Promise.then (async)
scheduleMicroTask @ zone.js:585
ZoneDelegate.scheduleTask @ zone.js:414
Zone.scheduleTask @ zone.js:236
Zone.scheduleMicroTask @ zone.js:256
scheduleResolveOrReject @ zone.js:871
ZoneAwarePromise.then @ zone.js:981
PlatformRef.bootstrapModule @ core.js:5569
(anonymous) @ main.ts:11
../../../../../src/main.ts @ main.bundle.js:296
__webpack_require__ @ inline.bundle.js:55
0 @ main.bundle.js:311
__webpack_require__ @ inline.bundle.js:55
webpackJsonpCallback @ inline.bundle.js:26
(anonymous) @ main.bundle.js:1
core.js:1427 ERROR Error: Uncaught (in promise): Error: Provider not set or invalid
Error: Provider not set or invalid
    at Object.InvalidProvider (errors.js:34)
    at RequestManager.sendAsync (requestmanager.js:76)
    at Object.get [as getNetwork] (property.js:116)
    at eval (contract.js:487)
    at new ZoneAwarePromise (zone.js:890)
    at Function.detectNetwork (contract.js:478)
    at Function.deployed (contract.js:426)
    at ExchangeService.refreshBalanceEtherInExchange (exchange.service.ts:40)
    at new ExchangeService (exchange.service.ts:28)
    at _createClass (core.js:10915)
    at _createProviderInstance$1 (core.js:10889)
    at resolveNgModuleDep (core.js:10874)
    at NgModuleRef_.get (core.js:12110)
    at resolveDep (core.js:12608)
    at createClass (core.js:12470)
    at createDirectiveInstance (core.js:12315)
    at createViewNodes (core.js:13776)
    at callViewAction (core.js:14210)
    at execComponentViewsAction (core.js:14119)
    at createViewNodes (core.js:13804)
    at createRootView (core.js:13665)
    at callWithDebugContext (core.js:15090)
    at Object.InvalidProvider (errors.js:34)
    at RequestManager.sendAsync (requestmanager.js:76)
    at Object.get [as getNetwork] (property.js:116)
    at eval (contract.js:487)
    at new ZoneAwarePromise (zone.js:890)
    at Function.detectNetwork (contract.js:478)
    at Function.deployed (contract.js:426)
    at ExchangeService.refreshBalanceEtherInExchange (exchange.service.ts:40)
    at new ExchangeService (exchange.service.ts:28)
    at _createClass (core.js:10915)
    at _createProviderInstance$1 (core.js:10889)
    at resolveNgModuleDep (core.js:10874)
    at NgModuleRef_.get (core.js:12110)
    at resolveDep (core.js:12608)
    at createClass (core.js:12470)
    at createDirectiveInstance (core.js:12315)
    at createViewNodes (core.js:13776)
    at callViewAction (core.js:14210)
    at execComponentViewsAction (core.js:14119)
    at createViewNodes (core.js:13804)
    at createRootView (core.js:13665)
    at callWithDebugContext (core.js:15090)
    at resolvePromise (zone.js:824)
    at resolvePromise (zone.js:795)
    at eval (zone.js:873)
    at ZoneDelegate.invokeTask (zone.js:425)
    at Object.onInvokeTask (core.js:4744)
    at ZoneDelegate.invokeTask (zone.js:424)
    at Zone.runTask (zone.js:192)
    at drainMicroTaskQueue (zone.js:602)
defaultErrorLogger @ core.js:1427
ErrorHandler.handleError @ core.js:1488
next @ core.js:5498
schedulerFn @ core.js:4339
SafeSubscriber.__tryOrUnsub @ Subscriber.js:239
SafeSubscriber.next @ Subscriber.js:186
Subscriber._next @ Subscriber.js:127
Subscriber.next @ Subscriber.js:91
Subject.next @ Subject.js:56
EventEmitter.emit @ core.js:4319
(anonymous) @ core.js:4775
ZoneDelegate.invoke @ zone.js:392
Zone.run @ zone.js:142
NgZone.runOutsideAngular @ core.js:4701
onHandleError @ core.js:4775
ZoneDelegate.handleError @ zone.js:396
Zone.runGuarded @ zone.js:158
_loop_1 @ zone.js:702
api.microtaskDrainDone @ zone.js:711
drainMicroTaskQueue @ zone.js:610
Promise.then (async)
scheduleMicroTask @ zone.js:585
ZoneDelegate.scheduleTask @ zone.js:414
Zone.scheduleTask @ zone.js:236
Zone.scheduleMicroTask @ zone.js:256
scheduleResolveOrReject @ zone.js:871
ZoneAwarePromise.then @ zone.js:981
PlatformRef.bootstrapModule @ core.js:5569
(anonymous) @ main.ts:11
../../../../../src/main.ts @ main.bundle.js:296
__webpack_require__ @ inline.bundle.js:55
0 @ main.bundle.js:311
__webpack_require__ @ inline.bundle.js:55
webpackJsonpCallback @ inline.bundle.js:26
(anonymous) @ main.bundle.js:1
web3.service.ts:59 Refreshing accounts```

what can I do?
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

1 participant