inrupt/generator-solid-angular

ng e2e Bug

pxstrana opened this issue · 2 comments

Hello,
I´m working on a solid app based on this structure and I´m having some problems with the e2e tests.

In order to try to solve the error I deployed this small app from zero and tried to run the e2e tests, in this case I didn´t create any but I was expecting some error like empty tests or everything passed. But it raised this (you can skip the trace I´ve found the error):

 throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at ChildProcess.target._send (internal/child_process.js:750:20)
    at ChildProcess.target.send (internal/child_process.js:634:19)
    at Observable.rxjs_1.Observable.obs [as _subscribe] (C:\Users\Pedro\Desktop\ASW\Testing\dechat_en2a\testingApp\node_modules\@angular-devkit\build-angular\src\utils\run-modul
e-as-observable-fork.js:57:23)
    at Observable._trySubscribe (C:\Users\Pedro\Desktop\ASW\Testing\dechat_en2a\testingApp\node_modules\rxjs\internal\Observable.js:44:25)
    at Observable.subscribe (C:\Users\Pedro\Desktop\ASW\Testing\dechat_en2a\testingApp\node_modules\rxjs\internal\Observable.js:30:22)
    at C:\Users\Pedro\Desktop\ASW\Testing\dechat_en2a\testingApp\node_modules\rxjs\internal\util\subscribeTo.js:22:31
    at Object.subscribeToResult (C:\Users\Pedro\Desktop\ASW\Testing\dechat_en2a\testingApp\node_modules\rxjs\internal\util\subscribeToResult.js:10:45)
    at MergeMapSubscriber._innerSub (C:\Users\Pedro\Desktop\ASW\Testing\dechat_en2a\testingApp\node_modules\rxjs\internal\operators\mergeMap.js:82:29)
    at MergeMapSubscriber._tryNext (C:\Users\Pedro\Desktop\ASW\Testing\dechat_en2a\testingApp\node_modules\rxjs\internal\operators\mergeMap.js:76:14)
    at MergeMapSubscriber._next (C:\Users\Pedro\Desktop\ASW\Testing\dechat_en2a\testingApp\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
    at MergeMapSubscriber.Subscriber.next (C:\Users\Pedro\Desktop\ASW\Testing\dechat_en2a\testingApp\node_modules\rxjs\internal\Subscriber.js:67:18)
    at MergeMapSubscriber.notifyNext (C:\Users\Pedro\Desktop\ASW\Testing\dechat_en2a\testingApp\node_modules\rxjs\internal\operators\mergeMap.js:92:26)
    at InnerSubscriber._next (C:\Users\Pedro\Desktop\ASW\Testing\dechat_en2a\testingApp\node_modules\rxjs\internal\InnerSubscriber.js:28:21)
    at InnerSubscriber.Subscriber.next (C:\Users\Pedro\Desktop\ASW\Testing\dechat_en2a\testingApp\node_modules\rxjs\internal\Subscriber.js:67:18)
    at C:\Users\Pedro\Desktop\ASW\Testing\dechat_en2a\testingApp\node_modules\rxjs\internal\util\subscribeToPromise.js:7:24
    at process._tickCallback (internal/process/next_tick.js:68:7)
Emitted 'error' event at:
    at process.nextTick (internal/child_process.js:754:39)
    at process._tickCallback (internal/process/next_tick.js:61:11)

If you upgrade angular, the error trace will be more verbose.
Command : ng update @angular/cli @angular/core.

Now, it will show something like this:

ERROR in src/app/services/solid.auth.service.ts(37,5): error TS2322: Type 'Observable<{}>' is not assignable to type 'Observable<SolidSession>'.
  Type '{}' is missing the following properties from type 'SolidSession': accessToken, clientId, idToken, sessionKey, webId

To make it possible to run the test I just deleted the session type of solid.auth.service.ts

//code without modification
export class AuthService {
  session: Observable<SolidSession>;
  ...

Now you can run the tests, build etc. without any problem.

Interesting! Thank you for the report. Is this something you could open a PR for?

I tried, but I don´t have access to open it. But, anyway it is a small change of one line.