Error with login to ADF

cancel
Showing results for 
Search instead for 
Did you mean: 
udayakumar_p
Active Member

Re: Error with login to ADF

Jump to solution

I have tried the options suggested in the links you gave. The configuration i used is pretty much the same they recommended. I also tried something like the below configuration given in one of the urls. 

{   "/angular": {      "target":  {        "host": "github.com",        "protocol": "https:",        "port": 443      },      "secure": false,      "changeOrigin": true,      "logLevel": "info"   } }

It doesn't work either.

eugenio_romano
Alfresco Employee

Re: Error with login to ADF

Jump to solution

Sorry maybe my request wasn't really clear I intend the chrome dev-tools network log

udayakumar_p
Active Member

Re: Error with login to ADF

Jump to solution

Hi,

Here is the chrome console log.

POST http://localhost:4200/activiti-app/app/authentication 404 (Not Found)
scheduleTask @ zone.js:2616
ZoneDelegate.scheduleTask @ zone.js:410
onScheduleTask @ zone.js:300
ZoneDelegate.scheduleTask @ zone.js:404
Zone.scheduleTask @ zone.js:235
Zone.scheduleMacroTask @ zone.js:258
(anonymous) @ zone.js:2640
proto.(anonymous function) @ zone.js:1221
Request._end @ alfresco-js-api.js:29771
Request.end @ alfresco-js-api.js:29677
(anonymous) @ alfresco-js-api.js:159
ZoneAwarePromise @ zone.js:847
callApi @ alfresco-js-api.js:158
(anonymous) @ alfresco-js-api.js:53258
ZoneAwarePromise @ zone.js:847
login @ alfresco-js-api.js:53257
_loginBPMECM @ alfresco-js-api.js:30215
login @ alfresco-js-api.js:30166
AuthenticationService.callApiLogin @ adf-core.umd.js:2891
AuthenticationService.login @ adf-core.umd.js:2848
LoginComponent.performLogin @ adf-core.umd.js:7526
LoginComponent.onSubmit @ adf-core.umd.js:7493
(anonymous) @ LoginComponent.html:7
handleEvent @ core.js:13254
callWithDebugContext @ core.js:14739
debugHandleEvent @ core.js:14326
dispatchEvent @ core.js:9703
(anonymous) @ core.js:10317
(anonymous) @ platform-browser.js:2614
ZoneDelegate.invokeTask @ zone.js:424
onInvokeTask @ core.js:4617
ZoneDelegate.invokeTask @ zone.js:423
Zone.runTask @ zone.js:191
ZoneTask.invokeTask @ zone.js:498
invokeTask @ zone.js:1364
globalZoneAwareCallback @ zone.js:1382
adf-core.umd.js:3031 Error when logging in Error: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /activiti-app/app/authentication</pre>
</body>
</html>


at Request.eval (alfresco-js-api.js:29403)
at Request.Emitter.emit (alfresco-js-api.js:54354)
at XMLHttpRequest.xhr.onreadystatechange (alfresco-js-api.js:29706)
at XMLHttpRequest.wrapFn [as __zone_symbol___onreadystatechange] (zone.js:1069)
at ZoneDelegate.invokeTask (zone.js:424)
at Object.onInvokeTask (core.js:4617)
at ZoneDelegate.invokeTask (zone.js:423)
at Zone.runTask (zone.js:191)
at ZoneTask.invokeTask [as invoke] (zone.js:498)
at invokeTask (zone.js:1364)
AuthenticationService.handleError @ adf-core.umd.js:3031
(anonymous) @ adf-core.umd.js:2858
CatchSubscriber.error @ catchError.js:105
Subscriber._error @ Subscriber.js:130
Subscriber.error @ Subscriber.js:104
(anonymous) @ PromiseObservable.js:73
ZoneDelegate.invoke @ zone.js:391
onInvoke @ core.js:4626
ZoneDelegate.invoke @ zone.js:390
Zone.run @ zone.js:141
(anonymous) @ zone.js:831
ZoneDelegate.invokeTask @ zone.js:424
onInvokeTask @ core.js:4617
ZoneDelegate.invokeTask @ zone.js:423
Zone.runTask @ zone.js:191
drainMicroTaskQueue @ zone.js:595
ZoneTask.invokeTask @ zone.js:502
invokeTask @ zone.js:1364
globalZoneAwareCallback @ zone.js:1382
XMLHttpRequest.send (async)
scheduleTask @ zone.js:2616
ZoneDelegate.scheduleTask @ zone.js:410
onScheduleTask @ zone.js:300
ZoneDelegate.scheduleTask @ zone.js:404
Zone.scheduleTask @ zone.js:235
Zone.scheduleMacroTask @ zone.js:258
(anonymous) @ zone.js:2640
proto.(anonymous function) @ zone.js:1221
Request._end @ alfresco-js-api.js:29771
Request.end @ alfresco-js-api.js:29677
(anonymous) @ alfresco-js-api.js:159
ZoneAwarePromise @ zone.js:847
callApi @ alfresco-js-api.js:158
(anonymous) @ alfresco-js-api.js:53258
ZoneAwarePromise @ zone.js:847
login @ alfresco-js-api.js:53257
_loginBPMECM @ alfresco-js-api.js:30215
login @ alfresco-js-api.js:30166
AuthenticationService.callApiLogin @ adf-core.umd.js:2891
AuthenticationService.login @ adf-core.umd.js:2848
LoginComponent.performLogin @ adf-core.umd.js:7526
LoginComponent.onSubmit @ adf-core.umd.js:7493
(anonymous) @ LoginComponent.html:7
handleEvent @ core.js:13254
callWithDebugContext @ core.js:14739
debugHandleEvent @ core.js:14326
dispatchEvent @ core.js:9703
(anonymous) @ core.js:10317
(anonymous) @ platform-browser.js:2614
ZoneDelegate.invokeTask @ zone.js:424
onInvokeTask @ core.js:4617
ZoneDelegate.invokeTask @ zone.js:423
Zone.runTask @ zone.js:191
ZoneTask.invokeTask @ zone.js:498
invokeTask @ zone.js:1364
globalZoneAwareCallback @ zone.js:1382

douglascrp
Advanced II

Re: Error with login to ADF

Jump to solution

If I understood well, you are trying ADF against Alfresco Content Service only, and your log indicates your ADF application is trying to log in against Activiti.

If you intent to use only Alfresco, and not Activiti, you have to change your adf-login component configuration, something like:

<adf-login
   [providers]="'ECM'"
   (success)="mySuccessMethod($event)"
   (error)="myErrorMethod($event)">
</adf-login>

You can check the component properties at alfresco-ng2-components/login.component.md at master · Alfresco/alfresco-ng2-components · GitHub 

udayakumar_p
Active Member

Re: Error with login to ADF

Jump to solution

Setting  providers="ECM" in the login component fixed the issue. Thank you all who helped with this.