By enriquebarco
Hi,
I was able to successfully launch my MVP application to digital ocean by creating a droplet and cloning my github repository. However, a core feature of my application is generating a dynamic contract which then opens as a PDF in a new tab. While it works perfectly fine on localhost, this feature no longer works on my deployed version. The new page renders empty with “you need to enable javascript to run this app” in the network response/preview.
The contract itself is being successfully generated and stored in the file it should. The absolute file path for the location where all the PDFs are being stored is /root/unbound/server/contracts/2022-02-09test_doc.pdf
The front end code attempts to open the PDF file with the following path:unbound-teams.com/contracts/2022-02/09test_doc.pdf
(adding either root or server to the file path does not solve the problem)
I am not sure if this is related but my attempts to open the PDF file directly from my digital ocean droplet through Ubuntu generates the following errors:
xdg-open 2022-02-09test_doc.pdf
Error: no “view” rule for type “application/pdf” passed its test case (for more information, add “–debug=1” on the command line) /usr/bin/xdg-open: 869: www-browser: not found /usr/bin/xdg-open: 869: links2: not found /usr/bin/xdg-open: 869: elinks: not found /usr/bin/xdg-open: 869: links: not found /usr/bin/xdg-open: 869: lynx: not found /usr/bin/xdg-open: 869: w3m: not found xdg-open: no method available for opening ‘2022-02-09test_doc.pdf’
Attempts with evince also did not work with the following error: Unable to init server: Could not connect: Connection refused Cannot parse arguments: Cannot open display:
Does anyone have any ideas on what might be going on? Your help is greatly appreciated.
Best, Enrique
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
Seems like you might have to install lynx first.
You can do that by running the following command:
sudo apt-get install lynx
Let me know how it goes!
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.