Need help with ADF

cancel
Showing results for 
Search instead for 
Did you mean: 
ramprasad
Member II

Need help with ADF

I tried to get ADF working locally. I get the following error:

I went through the installation instructions. I have not enabled APS. Not sure where I went wrong. Any pointers? Thanks in advance.

24 Replies
kalpesh_c2
Senior Member

Re: Need help with ADF

Hi,

This thread might help you How fix "Request has been terminated..." 

Thanks,

Kalpesh

ContCentric

eugenio_romano
Alfresco Employee
ramprasad
Member II

Re: Need help with ADF

HI,

Looks like ADF is trying to communicate with ACS. Unsure which setting I have missed. Please see screenshot below. When I look at the network tab in Developer tools, there is some traffic. Any pointers where to investigate?

eugenio_romano
Alfresco Employee

Re: Need help with ADF

Which browser do you use?

Can I have a log of your network using chrome developer tools? 

thanks

ramprasad
Member II

Re: Need help with ADF

I use Chrome and Firefox. Same issues on both. I am unable to attach the logs as I do not see a provision for it. Here is the log:

06:04:44.457 ng2-alfresco-core.js:3433 AlfrescoSettingsService.getProviders is deprecated. Use UserPreferencesService.authType instead.
06:04:44.462 ng2-alfresco-core.js:3407 AlfrescoSettingsService.csrfDisabled is deprecated. Use UserPreferencesService.disableCSRF instead.
06:04:44.464 alfresco-js-api.js:29567 The provided value 'application/json' is not a valid enum value of type XMLHttpRequestResponseType.
Request._end @ alfresco-js-api.js:29567
Request.end @ alfresco-js-api.js:29481
(anonymous) @ alfresco-js-api.js:155
ZoneAwarePromise @ zone.js:833
callApi @ alfresco-js-api.js:154
createTicket @ alfresco-js-api.js:44242
(anonymous) @ alfresco-js-api.js:52693
ZoneAwarePromise @ zone.js:833
login @ alfresco-js-api.js:52692
_loginBPMECM @ alfresco-js-api.js:30018
login @ alfresco-js-api.js:29970
AuthenticationService.callApiLogin @ ng2-alfresco-core.js:387
AuthenticationService.login @ ng2-alfresco-core.js:361
LoginComponent.performLogin @ ng2-alfresco-login.js:214
LoginComponent.onSubmit @ ng2-alfresco-login.js:190
(anonymous) @ LoginComponent.ngfactory.js:306
handleEvent @ core.es5.js:12251
handleEvent @ core.es5.js:12975
dispatchEvent @ core.es5.js:8863
(anonymous) @ core.es5.js:9474
(anonymous) @ platform-browser.es5.js:2716
ZoneDelegate.invokeTask @ zone.js:424
onInvokeTask @ core.es5.js:4128
ZoneDelegate.invokeTask @ zone.js:423
Zone.runTask @ zone.js:191
ZoneTask.invoke @ zone.js:486
06:04:44.481 zone.js:2224 OPTIONS http://127.0.0.1:8080/alfresco/api/-default-/public/authentication/versions/1/tickets
scheduleTask @ zone.js:2224
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:2248
proto.(anonymous function) @ zone.js:1425
Request._end @ alfresco-js-api.js:29575
Request.end @ alfresco-js-api.js:29481
(anonymous) @ alfresco-js-api.js:155
ZoneAwarePromise @ zone.js:833
callApi @ alfresco-js-api.js:154
createTicket @ alfresco-js-api.js:44242
(anonymous) @ alfresco-js-api.js:52693
ZoneAwarePromise @ zone.js:833
login @ alfresco-js-api.js:52692
_loginBPMECM @ alfresco-js-api.js:30018
login @ alfresco-js-api.js:29970
AuthenticationService.callApiLogin @ ng2-alfresco-core.js:387
AuthenticationService.login @ ng2-alfresco-core.js:361
LoginComponent.performLogin @ ng2-alfresco-login.js:214
LoginComponent.onSubmit @ ng2-alfresco-login.js:190
(anonymous) @ LoginComponent.ngfactory.js:306
handleEvent @ core.es5.js:12251
handleEvent @ core.es5.js:12975
dispatchEvent @ core.es5.js:8863
(anonymous) @ core.es5.js:9474
(anonymous) @ platform-browser.es5.js:2716
ZoneDelegate.invokeTask @ zone.js:424
onInvokeTask @ core.es5.js:4128
ZoneDelegate.invokeTask @ zone.js:423
Zone.runTask @ zone.js:191
ZoneTask.invoke @ zone.js:486
06:04:44.481 zone.js:2224 OPTIONS http://127.0.0.1:8080/alfresco/api/-default-/public/authentication/versions/1/tickets
scheduleTask @ zone.js:2224
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:2248
proto.(anonymous function) @ zone.js:1425
Request._end @ alfresco-js-api.js:29575
Request.end @ alfresco-js-api.js:29481
(anonymous) @ alfresco-js-api.js:155
ZoneAwarePromise @ zone.js:833
callApi @ alfresco-js-api.js:154
createTicket @ alfresco-js-api.js:44242
(anonymous) @ alfresco-js-api.js:52693
ZoneAwarePromise @ zone.js:833
login @ alfresco-js-api.js:52692
_loginBPMECM @ alfresco-js-api.js:30018
login @ alfresco-js-api.js:29970
AuthenticationService.callApiLogin @ ng2-alfresco-core.js:387
AuthenticationService.login @ ng2-alfresco-core.js:361
LoginComponent.performLogin @ ng2-alfresco-login.js:214
LoginComponent.onSubmit @ ng2-alfresco-login.js:190
(anonymous) @ LoginComponent.ngfactory.js:306
handleEvent @ core.es5.js:12251
handleEvent @ core.es5.js:12975
dispatchEvent @ core.es5.js:8863
(anonymous) @ core.es5.js:9474
(anonymous) @ platform-browser.es5.js:2716
ZoneDelegate.invokeTask @ zone.js:424
onInvokeTask @ core.es5.js:4128
ZoneDelegate.invokeTask @ zone.js:423
Zone.runTask @ zone.js:191
ZoneTask.invoke @ zone.js:486
06:04:44.481 login:1 XMLHttpRequest cannot load http://127.0.0.1:8080/alfresco/api/-default-/public/authentication/versions/1/tickets. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 401.
06:04:44.482 ng2-alfresco-core.js:449 Error when logging in {error: Error: Request has been terminated
Possible causes: the network is offline, Origin is not allowed by…}
AuthenticationService.handleError @ ng2-alfresco-core.js:449
(anonymous) @ ng2-alfresco-core.js:371
CatchSubscriber.error @ catch.js:104
Subscriber._error @ Subscriber.js:128
Subscriber.error @ Subscriber.js:102
(anonymous) @ PromiseObservable.js:71
ZoneDelegate.invoke @ zone.js:391
onInvoke @ core.es5.js:4137
ZoneDelegate.invoke @ zone.js:390
Zone.run @ zone.js:141
(anonymous) @ zone.js:817
ZoneDelegate.invokeTask @ zone.js:424
onInvokeTask @ core.es5.js:4128
ZoneDelegate.invokeTask @ zone.js:423
Zone.runTask @ zone.js:191
drainMicroTaskQueue @ zone.js:584
ZoneTask.invoke @ zone.js:490
XMLHttpRequest.send (async)
scheduleTask @ zone.js:2224
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:2248
proto.(anonymous function) @ zone.js:1425
Request._end @ alfresco-js-api.js:29575
Request.end @ alfresco-js-api.js:29481
(anonymous) @ alfresco-js-api.js:155
ZoneAwarePromise @ zone.js:833
callApi @ alfresco-js-api.js:154
createTicket @ alfresco-js-api.js:44242
(anonymous) @ alfresco-js-api.js:52693
ZoneAwarePromise @ zone.js:833
login @ alfresco-js-api.js:52692
_loginBPMECM @ alfresco-js-api.js:30018
login @ alfresco-js-api.js:29970
AuthenticationService.callApiLogin @ ng2-alfresco-core.js:387
AuthenticationService.login @ ng2-alfresco-core.js:361
LoginComponent.performLogin @ ng2-alfresco-login.js:214
LoginComponent.onSubmit @ ng2-alfresco-login.js:190
(anonymous) @ LoginComponent.ngfactory.js:306
handleEvent @ core.es5.js:12251
handleEvent @ core.es5.js:12975
dispatchEvent @ core.es5.js:8863
(anonymous) @ core.es5.js:9474
(anonymous) @ platform-browser.es5.js:2716
ZoneDelegate.invokeTask @ zone.js:424
onInvokeTask @ core.es5.js:4128
ZoneDelegate.invokeTask @ zone.js:423
Zone.runTask @ zone.js:191
ZoneTask.invoke @ zone.js:486
06:04:44.483 login-demo.component.ts:75 {error: Error: Request has been terminated
Possible causes: the network is offline, Origin is not allowed by…}
LoginDemoComponent.onError @ login-demo.component.ts:75
(anonymous) @ LoginDemoComponent.ngfactory.js:134
handleEvent @ core.es5.js:12251
handleEvent @ core.es5.js:12975
dispatchEvent @ core.es5.js:8863
(anonymous) @ core.es5.js:11025
schedulerFn @ core.es5.js:3851
SafeSubscriber.__tryOrUnsub @ Subscriber.js:223
SafeSubscriber.next @ Subscriber.js:172
Subscriber._next @ Subscriber.js:125
Subscriber.next @ Subscriber.js:89
Subject.next @ Subject.js:55
EventEmitter.emit @ core.es5.js:3825
(anonymous) @ ng2-alfresco-login.js:223
SafeSubscriber.__tryOrUnsub @ Subscriber.js:223
SafeSubscriber.error @ Subscriber.js:184
Subscriber._error @ Subscriber.js:128
Subscriber.error @ Subscriber.js:102
OuterSubscriber.notifyError @ OuterSubscriber.js:22
InnerSubscriber._error @ InnerSubscriber.js:26
Subscriber.error @ Subscriber.js:102
ErrorObservable._subscribe @ ErrorObservable.js:76
Observable._trySubscribe @ Observable.js:57
Observable.subscribe @ Observable.js:45
subscribeToResult @ subscribeToResult.js:22
CatchSubscriber.error @ catch.js:113
Subscriber._error @ Subscriber.js:128
Subscriber.error @ Subscriber.js:102
(anonymous) @ PromiseObservable.js:71
ZoneDelegate.invoke @ zone.js:391
onInvoke @ core.es5.js:4137
ZoneDelegate.invoke @ zone.js:390
Zone.run @ zone.js:141
(anonymous) @ zone.js:817
ZoneDelegate.invokeTask @ zone.js:424
onInvokeTask @ core.es5.js:4128
ZoneDelegate.invokeTask @ zone.js:423
Zone.runTask @ zone.js:191
drainMicroTaskQueue @ zone.js:584
ZoneTask.invoke @ zone.js:490
XMLHttpRequest.send (async)
scheduleTask @ zone.js:2224
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:2248
proto.(anonymous function) @ zone.js:1425
Request._end @ alfresco-js-api.js:29575
Request.end @ alfresco-js-api.js:29481
(anonymous) @ alfresco-js-api.js:155
ZoneAwarePromise @ zone.js:833
callApi @ alfresco-js-api.js:154
createTicket @ alfresco-js-api.js:44242
(anonymous) @ alfresco-js-api.js:52693
ZoneAwarePromise @ zone.js:833
login @ alfresco-js-api.js:52692
_loginBPMECM @ alfresco-js-api.js:30018
login @ alfresco-js-api.js:29970
AuthenticationService.callApiLogin @ ng2-alfresco-core.js:387
AuthenticationService.login @ ng2-alfresco-core.js:361
LoginComponent.performLogin @ ng2-alfresco-login.js:214
LoginComponent.onSubmit @ ng2-alfresco-login.js:190
(anonymous) @ LoginComponent.ngfactory.js:306
handleEvent @ core.es5.js:12251
handleEvent @ core.es5.js:12975
dispatchEvent @ core.es5.js:8863
(anonymous) @ core.es5.js:9474
(anonymous) @ platform-browser.es5.js:2716
ZoneDelegate.invokeTask @ zone.js:424
onInvokeTask @ core.es5.js:4128
ZoneDelegate.invokeTask @ zone.js:423
Zone.runTask @ zone.js:191
ZoneTask.invoke @ zone.js:486
06:04:44.492 zone.js:2224 XHR failed loading: OPTIONS "http://127.0.0.1:8080/alfresco/api/-default-/public/authentication/versions/1/tickets".
scheduleTask @ zone.js:2224
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:2248
proto.(anonymous function) @ zone.js:1425
Request._end @ alfresco-js-api.js:29575
Request.end @ alfresco-js-api.js:29481
(anonymous) @ alfresco-js-api.js:155
ZoneAwarePromise @ zone.js:833
callApi @ alfresco-js-api.js:154
createTicket @ alfresco-js-api.js:44242
(anonymous) @ alfresco-js-api.js:52693
ZoneAwarePromise @ zone.js:833
login @ alfresco-js-api.js:52692
_loginBPMECM @ alfresco-js-api.js:30018
login @ alfresco-js-api.js:29970
AuthenticationService.callApiLogin @ ng2-alfresco-core.js:387
AuthenticationService.login @ ng2-alfresco-core.js:361
LoginComponent.performLogin @ ng2-alfresco-login.js:214
LoginComponent.onSubmit @ ng2-alfresco-login.js:190
(anonymous) @ LoginComponent.ngfactory.js:306
handleEvent @ core.es5.js:12251
handleEvent @ core.es5.js:12975
dispatchEvent @ core.es5.js:8863
(anonymous) @ core.es5.js:9474
(anonymous) @ platform-browser.es5.js:2716
ZoneDelegate.invokeTask @ zone.js:424
onInvokeTask @ core.es5.js:4128
ZoneDelegate.invokeTask @ zone.js:423
Zone.runTask @ zone.js:191
ZoneTask.invoke @ zone.js:486
06:04:45.484 zone.js:2224 OPTIONS http://127.0.0.1:9999/activiti-app/app/authentication net::ERR_CONNECTION_REFUSED
scheduleTask @ zone.js:2224
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:2248
proto.(anonymous function) @ zone.js:1425
Request._end @ alfresco-js-api.js:29575
Request.end @ alfresco-js-api.js:29481
(anonymous) @ alfresco-js-api.js:155
ZoneAwarePromise @ zone.js:833
callApi @ alfresco-js-api.js:154
(anonymous) @ alfresco-js-api.js:52397
ZoneAwarePromise @ zone.js:833
login @ alfresco-js-api.js:52396
_loginBPMECM @ alfresco-js-api.js:30019
login @ alfresco-js-api.js:29970
AuthenticationService.callApiLogin @ ng2-alfresco-core.js:387
AuthenticationService.login @ ng2-alfresco-core.js:361
LoginComponent.performLogin @ ng2-alfresco-login.js:214
LoginComponent.onSubmit @ ng2-alfresco-login.js:190
(anonymous) @ LoginComponent.ngfactory.js:306
handleEvent @ core.es5.js:12251
handleEvent @ core.es5.js:12975
dispatchEvent @ core.es5.js:8863
(anonymous) @ core.es5.js:9474
(anonymous) @ platform-browser.es5.js:2716
ZoneDelegate.invokeTask @ zone.js:424
onInvokeTask @ core.es5.js:4128
ZoneDelegate.invokeTask @ zone.js:423
Zone.runTask @ zone.js:191
ZoneTask.invoke @ zone.js:486
06:04:45.487 zone.js:2224 XHR failed loading: OPTIONS "http://127.0.0.1:9999/activiti-app/app/authentication".
scheduleTask @ zone.js:2224
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:2248
proto.(anonymous function) @ zone.js:1425
Request._end @ alfresco-js-api.js:29575
Request.end @ alfresco-js-api.js:29481
(anonymous) @ alfresco-js-api.js:155
ZoneAwarePromise @ zone.js:833
callApi @ alfresco-js-api.js:154
(anonymous) @ alfresco-js-api.js:52397
ZoneAwarePromise @ zone.js:833
login @ alfresco-js-api.js:52396
_loginBPMECM @ alfresco-js-api.js:30019
login @ alfresco-js-api.js:29970
AuthenticationService.callApiLogin @ ng2-alfresco-core.js:387
AuthenticationService.login @ ng2-alfresco-core.js:361
LoginComponent.performLogin @ ng2-alfresco-login.js:214
LoginComponent.onSubmit @ ng2-alfresco-login.js:190
(anonymous) @ LoginComponent.ngfactory.js:306
handleEvent @ core.es5.js:12251
handleEvent @ core.es5.js:12975
dispatchEvent @ core.es5.js:8863
(anonymous) @ core.es5.js:9474
(anonymous) @ platform-browser.es5.js:2716
ZoneDelegate.invokeTask @ zone.js:424
onInvokeTask @ core.es5.js:4128
ZoneDelegate.invokeTask @ zone.js:423
Zone.runTask @ zone.js:191
ZoneTask.invoke @ zone.js:486

Here is another version of the Authentication line item using Network tab

{
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.36"
},
"pages": [],
"entries": [
{
"startedDateTime": "2017-09-19T13:04:44.466Z",
"time": 25.043000001460314,
"request": {
"method": "OPTIONS",
"url": "http://127.0.0.1:8080/alfresco/api/-default-/public/authentication/versions/1/tickets",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Access-Control-Request-Method",
"value": "POST"
},
{
"name": "Origin",
"value": "http://localhost:3000"
},
{
"name": "Accept-Encoding",
"value": "gzip, deflate, br"
},
{
"name": "Host",
"value": "127.0.0.1:8080"
},
{
"name": "Accept-Language",
"value": "en-US,en;q=0.8"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36"
},
{
"name": "Accept",
"value": "*/*"
},
{
"name": "Referer",
"value": "http://localhost:3000/login"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Access-Control-Request-Headers",
"value": "authorization,content-type"
}
],
"queryString": [],
"cookies": [],
"headersSize": 508,
"bodySize": 0
},
"response": {
"status": 401,
"statusText": "Unauthorized",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Pragma",
"value": "no-cache"
},
{
"name": "Date",
"value": "Tue, 19 Sep 2017 13:04:44 GMT"
},
{
"name": "WWW-Authenticate",
"value": "Basic realm=\"Alfresco -default- tenant\""
},
{
"name": "Server",
"value": "Apache-Coyote/1.1"
},
{
"name": "Transfer-Encoding",
"value": "chunked"
},
{
"name": "Content-Type",
"value": "application/json;charset=UTF-8"
},
{
"name": "Cache-Control",
"value": "no-cache"
},
{
"name": "Expires",
"value": "Thu, 01 Jan 1970 00:00:00 GMT"
}
],
"cookies": [],
"content": {
"size": 0,
"mimeType": "application/json",
"compression": 0,
"text": ""
},
"redirectURL": "",
"headersSize": 309,
"bodySize": 0,
"_transferSize": 309,
"_error": ""
},
"cache": {},
"timings": {
"blocked": 1.12700001045596,
"dns": 0.021999992895869847,
"connect": 2.23199999891222,
"send": 0.13100000796838973,
"wait": 2.83499999204651,
"receive": 18.695999999181364,
"ssl": -1
},
"serverIPAddress": "127.0.0.1",
"connection": "7079"
},
{
"startedDateTime": "2017-09-19T13:04:44.467Z",
"time": 0,
"request": {
"method": "OPTIONS",
"url": "http://127.0.0.1:9999/activiti-app/app/authentication",
"httpVersion": "unknown",
"headers": [
{
"name": "Access-Control-Request-Method",
"value": "POST"
},
{
"name": "Origin",
"value": "http://localhost:3000"
},
{
"name": "Referer",
"value": "http://localhost:3000/login"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36"
},
{
"name": "Access-Control-Request-Headers",
"value": "cache-control,x-csrf-token"
}
],
"queryString": [],
"cookies": [],
"headersSize": -1,
"bodySize": 0
},
"response": {
"status": 0,
"statusText": "",
"httpVersion": "unknown",
"headers": [],
"cookies": [],
"content": {
"size": 0,
"mimeType": "x-unknown"
},
"redirectURL": "",
"headersSize": -1,
"bodySize": -1,
"_transferSize": 0,
"_error": "net::ERR_CONNECTION_REFUSED"
},
"cache": {},
"timings": {
"blocked": -1,
"dns": -1,
"connect": -1,
"send": 0,
"wait": 0,
"receive": 0,
"ssl": -1
},
"serverIPAddress": ""
}
]
}
}

eugenio_romano
Alfresco Employee

Re: Need help with ADF

Can you give me more details on where your Content service is?

ramprasad
Member II

Re: Need help with ADF

Localhost:8080

All are on the same machine. 

eugenio_romano
Alfresco Employee

Re: Need help with ADF

Maybe you can try to change your proxy configuration. Can you try with :

        proxy: {
            '/ecm': {
                target:  "http://0.0.0.0:8080",
                secure: false,
                pathRewrite: {
                    '^/ecm': ''
                },
                changeOrigin: true
            }
        }
  
ramprasad
Member II

Re: Need help with ADF

Same issue. Should the host address be 127.0.0.1 or should it be 0.0.0.0? In one place documentation asks us to change it to local address - 127.0.0.1 in my case but then all documentation refers to 0.0.0.0

There are two files that are needed as per the documentation:webpack.common.js where the devServer entry is made.

Then documentation also requires proxy.conf.json to be in place with almost exactly the same setting. Not sure why.

Which one should change?