adf-viewer causes 401 after deploy

cancel
Showing results for 
Search instead for 
Did you mean: 
dvuika
Alfresco Employee

Re: adf-viewer causes 401 after deploy

We use ADF apps internally with different servers and have not had any issues so far. I'm afraid we still need steps to reproduce it.

Can you try to replicate the issue with Alfresco Content Application? GitHub - Alfresco/alfresco-content-app: Alfresco Example Content Application

We don't support demo shell, so please also consider using Yeoman generator to create a fresh app and document steps to reproduce the problem (ADF 2.5.0 and ACS 5.2.3 or 6.0.x)

eugenio_romano
Alfresco Employee

Re: adf-viewer causes 401 after deploy

Hi, David has Denys says we run different apps more than once a day with more than 700 e2e test that target also the viewer.

So far those apps are no highlighting any of your problems.

I also checked it manually on the server and they are working fine . 

It is for sure your local configuration problem. My suggestion as Denys sasys is recreating a sandbox example with your configuration starting maybe from the example content app.

If you can recreate this error in a sandbox app that I can try exaplaing the step I guess we can help you better 

d_moeyersons
Customer

Re: adf-viewer causes 401 after deploy

Hi,

As Denys recommended, I downloaded the Alfresco Content Application: GitHub - Alfresco/alfresco-content-app: Alfresco Example Content Application. I am using ACS 5.2.3.

These were the steps:

  • Unpack alfresco-content-app-master.zip
  • Edit /proxy.conf.js and change the following values:
proxy.conf.js
 "target": "https://o-alfresco.vmm.be",
 "secure": true,

--> the document preview works correctly
  • Edit /package.json and change the following value:
package.json
 "build": "npm run server-versions && npm run build.libs.prod && node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng build app --prod --base-href /test/",
  • Run: npm run build
  • Edit /dist/app/app.config.json and change the following value:
app.config.json
 "ecmHost": "https://o-alfresco.vmm.be",
  • Create the file: /dist/app/WEB-INF/web.xml with the following content:
web.xml

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
   version="3.0"
   metadata-complete="true">

   <display-name>ADF Test</display-name>
   <description>
  ADF Test
   </description>
  
   <error-page>
  <error-code>404</error-code>
  <location>/index.html</location>
   </error-page>
 </web-app>

--> 401 on opening a document preview

dvuika
Alfresco Employee

Re: adf-viewer causes 401 after deploy

Thanks for the details. We will try to reproduce it locally.

Meanwhile, could you please test the configuration where base href is "./" ?

npm run build -- --base-href ./

Thanks.

d_moeyersons
Customer

Re: adf-viewer causes 401 after deploy

Same result with --base-href ./

dvuika
Alfresco Employee

Re: adf-viewer causes 401 after deploy

Maybe you could also see if you can reproduce that using ACS 6 and Tomcat 8?

d_moeyersons
Customer

Re: adf-viewer causes 401 after deploy

Hi Denys,

The 401 error doesn't come up with ACS 6 & Tomcat 8, the preview is shown.
It would be nice for us if ACS 5.2.3 would work too. We currently have a few reasons not to upgrade to ACS 6.

David.

dvuika
Alfresco Employee

Re: adf-viewer causes 401 after deploy

Good to hear that ACS 6 is working. You can also verify you have everything configured for the old tomcat version (Angular Docs) and create a support ticket to get it sorted out for 5.2.3 and tomcat 7