+ Start a Discussion
Rita LeverettRita Leverett 

User Interface API > Install the Sample App - Record Viewer won't launch

Hello all,

I followed the directions in the Trailhead module and clicked https://localhost:8443. I received the below error.

This site can’t be reached
localhost refused to connect.
Checking the connection
Checking the proxy and the firewall

I have internet connection, there is no proxy, and I turned off the firewall. I saw documentation that suggested checking for missing "listen:443". I found it in the nginx.conf file. Any help would be appreciated. Thank you.
Best Answer chosen by Rita Leverett
Rita LeverettRita Leverett
I was able to launch Record Viewer using Docker's default IP address instead of localhost.

All Answers

Nathan Schneider 9Nathan Schneider 9
I am stuck here too, specifically at this part: Use a CLI to build the Record Viewer app and start the server.

I went on a massive tangent and installed the salesforce CLI component and now I am so confused about what to do with: 
cd /path/to/RecordViewer
docker-compose build && docker-compose up -d

Please let me know if you got past this part! Together we will figure this out :)
Chellappa NagarajanChellappa Nagarajan
Nathan and Rita,

How coincident.. I am stuck at the same place.
They shouldn't give these kind of Trailhead module which involve installing different software.. Sometimes our laptops configurations can give trouble.

Now i am wondering whom to approach..
Jenna HuttJenna Hutt
I was having the same issue, and I changed "localhost" to my machine's IP address, and then I was able to get the page to launch. It then told me I needed to reset my OAUTH settings for my IP address rather than localhost.
Rita LeverettRita Leverett
Sorry, using my IP address gave the same error as before.
Rita LeverettRita Leverett
I was able to launch Record Viewer using Docker's default IP address instead of localhost.
This was selected as the best answer
Nathan Schneider 9Nathan Schneider 9
Update: resolved my earlier problem. Now stuck on the build portion:
docker-compose build && docker-compose up -d

The error is: client version 1.21 is too old. Minimum supported API version is 1.24, please upgrade your client to a newer version.
Rita LeverettRita Leverett
Please see issue #4106 https://github.com/docker/compose/issues/4106#issuecomment-356443809
Nathan Schneider 9Nathan Schneider 9
Thank you for your reply! How did you change your docker compose file to version 2.1? I assume that's what is wrong based on the forum link you sent. The docker-compose.yml file for the Record Viewer App looks like this and doesn't specify version:

  build: .
  command: 'bash -c ''node app.js'''
  working_dir: /usr/src/app
    PORT: 8050
    NGINX_PORT: 8443
    - './views:/app/user/views:ro'
  build: nginx
    - '8080:80'
    - '8443:443'
    - web:web
    - web
Jenna HuttJenna Hutt
I had to install docker toolbox because I did not have a machine running windows 10
Emilien Guichard 40Emilien Guichard 40

I'm using Docker Toolbox also because I am working an a 9 years old macbook pro.
I managed to connect to the recordviewer app by changing localghost in the url by the docker ip
to get it I did the following commands in the terminal
docker-machine ls
to get the machine name and
docker-machine ip default
to get the machine ip

now I am on this screen :
User-added image
I also changed the callback URL on the Connected App changing localhost by this IP.

Hope it will help.

Emilien Guichard 40Emilien Guichard 40
New issue now, in the Create New Record picklist I don't have any value :

User-added image
Any idea ?
Nathan Schneider 9Nathan Schneider 9
Yall- this module is greatly flawed. I encourage everyone reading this to give up and move on with other trailheads. I spent so many hours over the course of 2 weeks trying to debug this. Sure, I learned a lot but wow you'd think Salesforce could write some better instructions.
Jenna HuttJenna Hutt
The other thing that helped me with this challenge was running the command:
docker-compose build && docker-compose up -d
from within docker and not from a command prompt
Brett WagnerBrett Wagner
@Emilien Guichard 40 did you add the new to the CORS settings? I had the same issue and this is what solved it.
Pablo Ledesma 8Pablo Ledesma 8
I followed the instructions for this lesson but when I execute this command docker-compose build && docker-compose up -d I getting this error:

$ docker-compose build && docker-compose up -d
Building web
Step 1/7 : FROM node:8.9.3
 ---> 2eeae8debf3d
Step 2/7 : WORKDIR /usr/src/app
 ---> Using cache
 ---> 6fd40296c161
Step 3/7 : COPY package*.json ./
 ---> Using cache
 ---> e20e87430c1d
Step 4/7 : RUN npm install
 ---> Using cache
 ---> 3b2c9fce7413
Step 5/7 : COPY . .
 ---> Using cache
 ---> fa2d9c1471f4
Step 6/7 : RUN npm run build
 ---> Using cache
 ---> 010e170ae99c
Step 7/7 : CMD ["npm", "start"]
 ---> Using cache
 ---> 0f181acdc848
Successfully built 0f181acdc848
Successfully tagged recordviewer_web:latest
Building nginx
Step 1/6 : FROM nginx
 ---> ae513a47849c
Step 2/6 : RUN rm -v /etc/nginx/nginx.conf
 ---> Using cache
 ---> f3a03774eb38
Step 3/6 : ADD nginx.conf /etc/nginx/
 ---> Using cache
 ---> 23287709bf1c
Step 4/6 : RUN apt-get update &&     apt-get install -y openssl &&     cd /etc/nginx &&     openssl genrsa -des3 -passout pass:password1 -out cert.pass.key 2048 &&     openssl rsa -passin pass:password1 -in cert.pass.key -out cert.key &&     rm cert.pass.key &&     openssl req -new -key cert.key -out cert.csr         -subj "/C=US/ST=California/L=San Francisco/O=Example/OU=Example/CN=example.com" &&     openssl x509 -req -days 365 -in cert.csr -signkey cert.key -out cert.crt
 ---> Running in 3541510a2ed8
Err:1 http://security.debian.org/debian-security stretch/updates InRelease
  Temporary failure resolving 'security.debian.org'
Err:2 http://deb.debian.org/debian stretch InRelease
  Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian stretch-updates InRelease
  Temporary failure resolving 'deb.debian.org'
Reading package lists...
W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease  Temporary failure resolving 'security.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package openssl
Service 'nginx' failed to build: The command '/bin/sh -c apt-get update &&     apt-get install -y openssl &&     cd /etc/nginx &&     openssl genrsa -des3 -passout pass:password1 -out cert.pass.key 2048 &&     openssl rsa -passin pass:password1 -in cert.pass.key -out cert.key &&     rm cert.pass.key &&     openssl req -new -key cert.key -out cert.csr         -subj "/C=US/ST=California/L=San Francisco/O=Example/OU=Example/CN=example.com" &&     openssl x509 -req -days 365 -in cert.csr -signkey cert.key -out cert.crt' returned a non-zero code: 100

please help
This assignment annoyed me to no end and wasted my whole evening. Here's how to get around it: Create all the steps in SF with CORS and the connected resource etc. Don't bother installing Git, Docker or cloning the repo. Then go into the developer console, open an execute anonymous window then create the account with:

Account acct = new Account(Name='ABC Computing',Rating='Warm');
​insert acct;

then come back and check challenge. It won't know that you created the account with code vs. the RecordViewer app. This challenge was poorly written and should be amended with better instructions. Hope this help, Rob
Jefferson FernandezJefferson Fernandez
Hey Guys,

I'm on this step:

Use a CLI to build the Record Viewer app and start the server.
cd /path/to/RecordViewer docker-compose build && docker-compose up -d

Any idea with this error on cmd ?

Building web
Step 1/7 : FROM node:8.9.3
ERROR: Service 'web' failed to build: Get https://registry-1.docker.io/v2/library/node/manifests/8.9.3: unauthorized: incorrect username or password

I followed this link that says use on preferred DNS but still not working, same error. 

Please help, i'm stuck :( TIA
Prasad N RPrasad N R
This is so true. I manually created an Account with name "ABC Computing" and Rating "Warm". I filled all mandatory fields and saved. I just clicked on "Check Challenge" and scored 500 points. This problem statement can be made better for sure.
Riccardo CastellanoRiccardo Castellano
i have the same problem when i do docker-compose build && docker-compose up -d 
i solve my trouble with this :
- i clone recordViewer in a directory that i created
- i read the readme.md tha is in the recordViewer directory that is created when i clone the project
- in the readme i read that i must go on a website : www.docker.com
- on this website create an account and download docker for mac (or windows , i use mac) 
-once you have download the proggram install it and run it
- on the home page you must enter the login credential you have created on www.docker.com
-now you can use the terminal of mac and go to the recordViewer directory and run docker-compose build && docker-compose up -d 
-after this, more download proccess starting 
-when the download an installing proccess end you can finally go to https://localhost:8443 on a browser and see the result 
Any new development on this issue. I am stuck on various front here. 
Denis DvoretskiyDenis Dvoretskiy
For Windows users try to change MTU parametr to 1500 in Docker\resources\windows-daemon-options.json as on the picture attached.User-added image
Gabriel Patrick SalasGabriel Patrick Salas
I solved this challenge!!! i hope this works for you guys too! simply follow these steps:

Salesforce does not check for third part apps to complete the challenge so DO NOT  bother dowloading git or dock or CLI or anything...

In your Trailhead Playground, from Setup, enter App and select App Manager.
Click New Connected App and enter these settings:
Connected App Name: RecordViewer
Contact Email: Your email address
Select: Enable OAuth Settings and enter these settings:
Callback URL: https://localhost:8443/oauth-redirect
Selected OAuth Scopes: Access and manage your data (api)
Click Save.
On the New Connected App page, click Continue.


From Setup, enter CORS and select CORS.
Click New.
For Origin URL Pattern, enter https://localhost:8443
Click Save.

and finally to finish the challenge:

Go to Accounts and click New
Account name: ABC Computing
Rating: Warm

check mate
Rachel VanBuskirkRachel VanBuskirk
I had the same issues with this module. It kept redirecting me to local host 3001 and I was unable to "continue to site" when I got the ERR_CONNECTION_REFUSED message. I followed the answer by Gabriel Patrick Salas
Filipe Eusebio 1Filipe Eusebio 1

Hello, i setup the correct environment in my Ubuntu dist.
I had to try some workarounds with the Docker installation. After that i runned this commands separately with succes:
$ sudo docker-compose build
$ docker-compose up -d

OS: 18.04.1-Ubuntu x86_64 GNU/Linux

Igor VasylevskyiIgor Vasylevskyi
I use "" instead "https://localhost:8443". "" is default docker ip on my pc. You can find your docker default ip by command "docker-machine ip default"
Jesus PgJesus Pg
A mi me funciono esta solucion. Gracias
Michael JanuaryMichael January
Hi All,

I also battled with this module. 

1. Docker is NOT compatible with Windows 10 Home. Rather use Docker Toolbox if you are on Windows 10 Home.

2. Make sure you add your RecordViewer folder to the Shared Folders using VirtualBox / Settings.

3. The compile command works fine as long as your DEFAULT box is running ("docker-machine start" at command prompt).

4. Instead of using LOCALHOST:8443, replace all references with the IP Number of the DEFAULT virtual box. You can check the IP with command "docker-machine ls".

For me, it was

Use this URL when setting up the connected app in the APP MANAGER and in the CORS setup.

Lastly, if you are connecting to a PLAYGROUND, enter the URL of your playground when authorising, and NOT the generic login.salesforce.com as shown in the screenshot.

Hope that all helps.
voleti venkateshvoleti venkatesh
can anyone help me . i used docker ip address and also getting same error.
User-added imageUser-added imageUser-added image