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

Self-hosted instance always returns error "An unexpected error has ocurred. Please try again later." #19

Open
thomasfischer-his opened this issue Sep 13, 2022 · 2 comments

Comments

@thomasfischer-his
Copy link

I have setup a self-hosted instance of AMP. The webpage for providing an URL, HTML code, or uploading a HTML file appears in my browser when visiting http://localhost:4200 and looks like https://accessmonitor.acessibilidade.gov.pt/. However any attempt to validate an URL, HTML code, or an uploaded HTML file immediately shows the following error message:

 An unexpected error has ocurred. Please try again later. If the problem persists, please contact us.

Submitting the same URL or HTML code to the 'official' instance (https://accessmonitor.acessibilidade.gov.pt/) works without problems.

On the container's console, the most recent output is:

✔ Browser application bundle generation complete.

Initial Chunk Files | Names         |      Size
vendor.js           | vendor        |   4.06 MB
polyfills.js        | polyfills     |   1.12 MB
main.js             | main          | 705.21 kB
styles.css          | styles        |  79.36 kB
runtime.js          | runtime       |   6.89 kB

                    | Initial Total |   5.95 MB

Build at: 2022-09-13T09:09:31.831Z - Hash: fa4c89a39d85993e8cb1 - Time: 17324ms

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **


✔ Compiled successfully.

So, no error output. I couldn't find any log files in the container's filesystem, but it is possible that I looked at the wrong place.

Is it possible to run AMP in some debug/verbose mode to collect more information?

I am using the following Dockerfile:

FROM andrewmackrodt/nodejs-chromium

EXPOSE 4200 4200

ENV SUDO_NOPASSWD 1

USER root
WORKDIR /usr/app

RUN echo '> > > apt-get update -qq' && apt-get update -qq && echo '> > > apt-get install -qqy --no-install-recommends vim less netcat telnet iproute2 git bash' && apt-get install -qqy --no-install-recommends vim less netcat telnet iproute2 git bash && echo '> > > rm -rf /var/lib/apt/lists/*' && rm -rf /var/lib/apt/lists/* && echo '> > > git clone --depth 1 --single-branch https://github.com/amagovpt/access-monitor-plus.git' && git clone --depth 1 --single-branch https://github.com/amagovpt/access-monitor-plus.git

WORKDIR /usr/app/access-monitor-plus

RUN echo '> > > npm install' && npm install && echo '> > > npm update' && npm update && echo '> > > npm cache clean' && npm cache clean --force && echo '> > > ./node_modules/.bin/ng update' && ./node_modules/.bin/ng update && echo '> > > ./node_modules/.bin/ng build --configuration production' && ./node_modules/.bin/ng build --configuration production && echo "-- DONE --"

CMD ["./node_modules/.bin/ng", "serve"]

Instead of Docker, I am using Podman 4.2.1. The container's network is set to be the host's one (--net=host).

@AntonioEstriga
Copy link
Contributor

Hi, it looks like you have deployed AMP correctly but it seems like you are not running our back-end application https://github.com/amagovpt/monitor-server.

@thomasfischer-his
Copy link
Author

Thanks for the reply. I was loking into amagovpt/monitor-server, but it seems to have an issue of itself.

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

2 participants