Giter Club home page Giter Club logo

near.academy's People

Contributors

amgando avatar anson-vandoren avatar encody avatar insurecar avatar iopezi avatar jeffersonataide avatar lifeanalysis avatar lopezi avatar maxvyr avatar mement0l avatar nazarotakoyi avatar nazarstolyar avatar oceanbyte avatar ostaoleh-dev avatar petarvujovic98 avatar ryancwalsh avatar serhii-hurhsal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

near.academy's Issues

frontend deployment error "/nginx.conf": not found

https://dashboard.render.com/web/srv-c81d0hbvog4kd0lhropg/deploys/dep-c8alk7397ejbngq9t3o0

[3/3] COPY ./nginx.conf /etc/nginx/nginx.conf:
Feb 22 04:48:50 PM ------
Feb 22 04:48:50 PM Dockerfile:3
Feb 22 04:48:50 PM --------------------
Feb 22 04:48:50 PM 1 | FROM nginx:1.15.2-alpine
Feb 22 04:48:50 PM 2 | COPY ./build /var/www
Feb 22 04:48:50 PM 3 | >>> COPY ./nginx.conf /etc/nginx/nginx.conf
Feb 22 04:48:50 PM 4 | EXPOSE 80
Feb 22 04:48:50 PM 5 | ENTRYPOINT ["nginx","-g","daemon off;"]
Feb 22 04:48:50 PM --------------------
Feb 22 04:48:50 PM error: failed to solve: failed to compute cache key: "/nginx.conf": not found
Feb 22 04:48:50 PM error: exit status 1

Account creation redirects to home page

Describe the bug
While taking a course, it shows a pop-up asking to create an account. If the user accepts it and creates an account, it redirects to the home page and loses the current progress.

To Reproduce
Steps to reproduce the behavior:

  1. Follow Near101 course without an account and pass the first lesson. The modal for creating an account will display
  2. Click on create an account
  3. See error

Expected behavior
It should stay in the same page the user was before creating the account.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]: Firefox
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Error in tutorial for near.academy/near101/chapter-6

https://near.academy/near101/chapter-6

there's a bug at this above page.

it asks you to do this contract call with the NPM command line tool:

near call museum.testnet add_meme \
'{"meme" : "bob", "title" : "god", "data" : "https://9gag.com/gag/ad8K0vj", "category" : 4}' \
--accountId YOUR_ACCOUNT_NAME.testnet --amount 3

HOWEVER:

this contract will always run out of gas no matter what values you put in the call.

this is how the error message looks likes:

unknown

and it seems I am not the only one to have this problem because in the block explorer

(observe the failure calls for the add_meme method for the museum.testnet smart contract)

unknown

Copying anything else that 101labs controls

The repo has multiple dependencies (examples:

"docker-push": "doctl registry login && docker tag labs101/nearacademy-frontend registry.digitalocean.com/labs101/nearacademy-frontend && docker push registry.digitalocean.com/labs101/nearacademy-frontend",
and
"docker-push": "doctl registry login && docker tag labs101/nearacademy-api registry.digitalocean.com/labs101/nearacademy-api && docker push registry.digitalocean.com/labs101/nearacademy-api",
) mentioning labs101 and/or digitalocean.

We need to have copies (that we control) of any of that type of thing.

How can we do that?

Visiting paths (such as `/sign-up`) directly shows "Not Found"

As I mentioned at the bottom of my comment #25 (comment) and as @oceanByte mentioned at #17 (comment):

https://near-academy-frontend-tfyr.onrender.com/sign-up (if I visit it directly) shows Not Found but if I visit https://near-academy-frontend-tfyr.onrender.com and then click Sign Up, the page loads fine. That direct route works fine at https://near.academy/sign-up (on your old server).

My guess is that the original near.academy on Digital Ocean fixed this problem via some outside-of-this-repo config such as .htaccess file.

We can explore suggestions at https://stackoverflow.com/a/36623117/470749 and elsewhere.

Cannot claim NFT certificate

Describe the bug
Once you finished all chapters you can enter your name for the certificate. But you cannot enter an account name for the NFT certificate.

To Reproduce

  1. Go to https://near.academy/
  2. Finish all chapters
  3. Go to your profile page
  4. Follow the steps
  5. Click on "issue NFT"

Expected behavior
An input field for the account name should be given for the NFT certificate.

Fix API deployment

@oceanByte Scroll to the bottom to see the error I just experienced when trying to deploy the API at https://dashboard.render.com/web/srv-c81d23rvog4kd0lhrqrg/deploys/dep-c8aljrj97ejbngq9t2r0.

I see that src/api/Dockerfile says CMD ["node", "dist/index.js"].

Do you know what the problem is?

Thanks.

Feb 22 04:47:29 PM  ==> Cloning from https://github.com/NEAR-Edu/near.academy...
Feb 22 04:47:31 PM  ==> Checking out commit 2d347cb43088c88959b658c065319566f1bb57e1 in branch development
Feb 22 04:47:45 PM  ==> Downloading cache...
Feb 22 04:47:50 PM  #2 [internal] load .dockerignore
Feb 22 04:47:51 PM  #2 ...
Feb 22 04:47:51 PM  
Feb 22 04:47:51 PM  #1 [internal] load build definition from Dockerfile
Feb 22 04:47:51 PM  #1 transferring dockerfile: 197B done
Feb 22 04:47:51 PM  #1 DONE 0.7s
Feb 22 04:47:51 PM  
Feb 22 04:47:51 PM  #2 [internal] load .dockerignore
Feb 22 04:47:51 PM  #2 transferring context: 2B done
Feb 22 04:47:51 PM  #2 DONE 0.8s
Feb 22 04:47:51 PM  
Feb 22 04:47:51 PM  #3 [internal] load metadata for docker.io/library/node:16.14.0-alpine3.14
Feb 22 04:47:51 PM  #3 ...
Feb 22 04:47:51 PM  
Feb 22 04:47:51 PM  #4 [auth] library/node:pull token for registry-1.docker.io
Feb 22 04:47:51 PM  #4 DONE 0.0s
Feb 22 04:47:52 PM  
Feb 22 04:47:52 PM  #3 [internal] load metadata for docker.io/library/node:16.14.0-alpine3.14
Feb 22 04:47:52 PM  #3 DONE 1.6s
Feb 22 04:47:53 PM  
Feb 22 04:47:53 PM  #8 [internal] load build context
Feb 22 04:47:53 PM  #8 DONE 0.0s
Feb 22 04:47:53 PM  
Feb 22 04:47:53 PM  #5 [1/7] FROM docker.io/library/node:16.14.0-alpine3.14@sha256:98a87dfa76dde784bb4fe087518c839697ce1f0e4f55e6ad0b49f0bfd5fbe52c
Feb 22 04:47:53 PM  #5 resolve docker.io/library/node:16.14.0-alpine3.14@sha256:98a87dfa76dde784bb4fe087518c839697ce1f0e4f55e6ad0b49f0bfd5fbe52c
Feb 22 04:47:53 PM  #5 resolve docker.io/library/node:16.14.0-alpine3.14@sha256:98a87dfa76dde784bb4fe087518c839697ce1f0e4f55e6ad0b49f0bfd5fbe52c 0.2s done
Feb 22 04:47:54 PM  #5 ...
Feb 22 04:47:54 PM  
Feb 22 04:47:54 PM  #8 [internal] load build context
Feb 22 04:47:54 PM  #8 transferring context: 9.19MB 0.3s done
Feb 22 04:47:54 PM  #8 DONE 1.2s
Feb 22 04:47:54 PM  
Feb 22 04:47:54 PM  #5 [1/7] FROM docker.io/library/node:16.14.0-alpine3.14@sha256:98a87dfa76dde784bb4fe087518c839697ce1f0e4f55e6ad0b49f0bfd5fbe52c
Feb 22 04:47:54 PM  #5 DONE 1.6s
Feb 22 04:47:54 PM  
Feb 22 04:47:54 PM  #5 [1/7] FROM docker.io/library/node:16.14.0-alpine3.14@sha256:98a87dfa76dde784bb4fe087518c839697ce1f0e4f55e6ad0b49f0bfd5fbe52c
Feb 22 04:47:55 PM  #5 extracting sha256:97518928ae5f3d52d4164b314a7e73654eb686ecd8aafa0b79acd980773a740d
Feb 22 04:47:55 PM  #5 extracting sha256:97518928ae5f3d52d4164b314a7e73654eb686ecd8aafa0b79acd980773a740d 0.3s done
Feb 22 04:47:55 PM  #5 extracting sha256:884acb06399854759d90ca69f71f6ba3d3be88de193ec78501d4e57a517ca7d9
Feb 22 04:47:57 PM  #5 extracting sha256:884acb06399854759d90ca69f71f6ba3d3be88de193ec78501d4e57a517ca7d9 2.0s done
Feb 22 04:47:57 PM  #5 extracting sha256:a3930deb173dc6fe50792f24f5a7b18b7b35e5483cc2200d3ee3781663078fc8
Feb 22 04:47:57 PM  #5 extracting sha256:a3930deb173dc6fe50792f24f5a7b18b7b35e5483cc2200d3ee3781663078fc8 0.3s done
Feb 22 04:47:57 PM  #5 extracting sha256:5d629692057265ab58dcbcdebf4bb6f805c5c5104a7a51b8e79c42068873ac37
Feb 22 04:47:58 PM  #5 extracting sha256:5d629692057265ab58dcbcdebf4bb6f805c5c5104a7a51b8e79c42068873ac37 0.2s done
Feb 22 04:47:58 PM  #5 DONE 3.3s
Feb 22 04:47:58 PM  
Feb 22 04:47:58 PM  #6 [2/7] RUN mkdir -p /app
Feb 22 04:47:58 PM  #6 DONE 0.6s
Feb 22 04:47:58 PM  
Feb 22 04:47:58 PM  #7 [3/7] WORKDIR /app
Feb 22 04:47:59 PM  #7 DONE 0.6s
Feb 22 04:47:59 PM  
Feb 22 04:47:59 PM  #9 [4/7] COPY . /app
Feb 22 04:48:00 PM  #9 DONE 0.8s
Feb 22 04:48:00 PM  
Feb 22 04:48:00 PM  #10 [5/7] RUN cd /app
Feb 22 04:48:01 PM  #10 DONE 1.1s
Feb 22 04:48:01 PM  
Feb 22 04:48:01 PM  #11 [6/7] RUN yarn install
Feb 22 04:48:02 PM  #11 0.685 yarn install v1.22.17
Feb 22 04:48:02 PM  #11 0.841 [1/4] Resolving packages...
Feb 22 04:48:03 PM  #11 1.589 [2/4] Fetching packages...
Feb 22 04:48:19 PM  #11 18.54 [3/4] Linking dependencies...
Feb 22 04:48:19 PM  #11 18.55 warning "@typescript-eslint/eslint-plugin > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
Feb 22 04:48:19 PM  #11 18.55 warning " > [email protected]" has unmet peer dependency "webpack@>=1.11.0".
Feb 22 04:48:27 PM  #11 26.32 [4/4] Building fresh packages...
Feb 22 04:48:28 PM  #11 27.16 $ lerna bootstrap
Feb 22 04:48:29 PM  #11 27.79 lerna notice cli v3.22.0
Feb 22 04:48:29 PM  #11 27.80 lerna info versioning independent
Feb 22 04:48:29 PM  #11 27.86 lerna info Bootstrapping 2 packages
Feb 22 04:48:29 PM  #11 27.92 lerna info Installing external dependencies
Feb 22 04:50:30 PM  #11 148.8 lerna info Symlinking packages and binaries
Feb 22 04:50:30 PM  #11 148.9 lerna success Bootstrapped 2 packages
Feb 22 04:50:30 PM  #11 148.9 Done in 148.24s.
Feb 22 04:50:34 PM  #11 DONE 153.4s
Feb 22 04:50:34 PM  
Feb 22 04:50:34 PM  #12 [7/7] RUN yarn build
Feb 22 04:50:38 PM  #12 3.167 yarn run v1.22.17
Feb 22 04:50:38 PM  #12 3.231 $ lerna exec -- yarn run --parallel build
Feb 22 04:50:38 PM  #12 3.844 lerna notice cli v3.22.0
Feb 22 04:50:38 PM  #12 3.847 lerna info versioning independent
Feb 22 04:50:38 PM  #12 3.926 lerna info Executing command in 2 packages: "yarn run --parallel build"
Feb 22 04:50:39 PM  #12 4.236 warning package.json: No license field
Feb 22 04:50:39 PM  #12 4.282 $ react-scripts build
Feb 22 04:50:39 PM  #12 4.326 warning package.json: No license field
Feb 22 04:50:39 PM  #12 4.364 $ PORT=3000 NODE_ENV=production tsc
Feb 22 04:50:41 PM  #12 7.092 Creating an optimized production build...
Feb 22 04:52:31 PM  #12 116.5 Compiled successfully.
Feb 22 04:52:31 PM  #12 116.5
Feb 22 04:52:31 PM  #12 116.5 File sizes after gzip:
Feb 22 04:52:31 PM  #12 116.5
Feb 22 04:52:31 PM  #12 116.7   529.33 KB  build/static/js/2.9cdb3bf7.chunk.js
Feb 22 04:52:31 PM  #12 116.7   51.61 KB   build/static/js/main.4bc07ef3.chunk.js
Feb 22 04:52:31 PM  #12 116.7   46.96 KB   build/static/js/3.986444a6.chunk.js
Feb 22 04:52:31 PM  #12 116.7   45.76 KB   build/static/js/5.da267d2a.chunk.js
Feb 22 04:52:31 PM  #12 116.7   7.22 KB    build/static/js/4.7b904d00.chunk.js
Feb 22 04:52:31 PM  #12 116.7   1.2 KB     build/static/js/runtime-main.cd56fe50.js
Feb 22 04:52:31 PM  #12 116.7   351 B      build/static/css/main.302a7b18.chunk.css
Feb 22 04:52:31 PM  #12 116.7
Feb 22 04:52:31 PM  #12 116.7 The project was built assuming it is hosted at /.
Feb 22 04:52:31 PM  #12 116.7 You can control this with the homepage field in your package.json.
Feb 22 04:52:31 PM  #12 116.7
Feb 22 04:52:31 PM  #12 116.7 The build folder is ready to be deployed.
Feb 22 04:52:31 PM  #12 116.7 You may serve it with a static server:
Feb 22 04:52:31 PM  #12 116.7
Feb 22 04:52:31 PM  #12 116.7   yarn global add serve
Feb 22 04:52:31 PM  #12 116.7   serve -s build
Feb 22 04:52:31 PM  #12 116.7
Feb 22 04:52:31 PM  #12 116.7 Find out more about deployment here:
Feb 22 04:52:31 PM  #12 116.7
Feb 22 04:52:31 PM  #12 116.7   bit.ly/CRA-deploy
Feb 22 04:52:31 PM  #12 116.7
Feb 22 04:52:31 PM  #12 116.8 lerna success exec Executed command in 2 packages: "yarn run --parallel build"
Feb 22 04:52:31 PM  #12 116.8 Done in 113.67s.
Feb 22 04:52:32 PM  #12 DONE 117.4s
Feb 22 04:52:32 PM  
Feb 22 04:52:32 PM  #13 exporting to oci image format
Feb 22 04:52:32 PM  #13 exporting layers
Feb 22 04:54:58 PM  #13 exporting layers 146.3s done
Feb 22 04:54:58 PM  #13 exporting manifest sha256:b465be7ec71041552e7a328b7274e7247bcebcc28ee81265879955c95408a635 0.1s done
Feb 22 04:54:58 PM  #13 exporting config sha256:2a4f19b9ce4084f641948912a4fa0d04250b436a5d7ac85bc4aac0453060c39f
Feb 22 04:54:58 PM  #13 exporting config sha256:2a4f19b9ce4084f641948912a4fa0d04250b436a5d7ac85bc4aac0453060c39f 0.1s done
Feb 22 04:55:09 PM  #13 DONE 157.1s
Feb 22 04:55:09 PM  
Feb 22 04:55:09 PM  #14 exporting cache
Feb 22 04:55:09 PM  #14 preparing build cache for export
Feb 22 04:55:23 PM  #14 DONE 13.7s
Feb 22 04:55:25 PM  Pushing image to registry...
Feb 22 04:55:41 PM  DONE
Feb 22 04:56:37 PM  node:internal/modules/cjs/loader:936
Feb 22 04:56:37 PM    throw err;
Feb 22 04:56:37 PM    ^
Feb 22 04:56:37 PM  
Feb 22 04:56:37 PM  Error: Cannot find module '/app/dist/index.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
Feb 22 04:56:37 PM    code: 'MODULE_NOT_FOUND',
Feb 22 04:56:37 PM    requireStack: []
Feb 22 04:56:37 PM  }
Feb 22 04:56:38 PM  node:internal/modules/cjs/loader:936
Feb 22 04:56:38 PM    throw err;
Feb 22 04:56:38 PM    ^
Feb 22 04:56:38 PM  
Feb 22 04:56:38 PM  Error: Cannot find module '/app/dist/index.js'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
Feb 22 04:56:38 PM    code: 'MODULE_NOT_FOUND',
Feb 22 04:56:38 PM    requireStack: []
Feb 22 04:56:38 PM  }
Feb 22 04:56:52 PM  node:internal/modules/cjs/loader:936
Feb 22 04:56:52 PM    throw err;
Feb 22 04:56:52 PM    ^
Feb 22 04:56:52 PM  

Sign-up not working

Describe the bug
I cannot sign-up on https://near.academy/sign-up

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://near.academy/sign-up
  2. Complete the fields
  3. Press the Sign Up button
  4. Nothing happens

Expected behavior
Sign up should work.

Desktop (please complete the following information):

  • OS: macOS
  • Browser chrome
  • Version 98

Additional context

CORS error seem to appear in the Console tab

Access to fetch at 'https://api.near.academy/user/sign-up' from origin 'https://near.academy' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

cursor is accidentally jumping around in ChapterView

Describe the bug
the cursor is accidentally jumping around, look at the video

To Reproduce
Steps to reproduce the behavior:

  1. Just try to write things down a little bit faster than you do

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
image

Chrome last version

Additional context

Here's the vid
https://vimeo.com/676656735

Improve certificate UX

Related to #36

When logged into Academy, if I've already minted an NFT certificate:

  • it should be obvious where to find the image
  • it should be obvious where to find it on testnet or mainnet
  • I should be able to see it in my wallet
  • I should be blocked from creating another

Address these minor Eslint warnings

We had this problem:

image

So then I made this change: 1f139ea#diff-690b9368fbc32a1e3f2e50b5235b2a6cc8300aebbe25405852b7a23926de9c1fR93

But that causes logged-in chapter pages such as http://localhost:3000/near101/chapter-1 to send an infinite number of get-user requests:
telegram-cloud-photo-size-1-4992244478068763180-y

This was happening when migrating the near.academy domain from pointing to the old Digital Ocean servers to the new Render.com servers.

So @oceanByte quickly pushed this commit to fix it 093cba3 (which caused deployments of the API and Frontend).

And so now the get-user problem isn't happening on our newly-relocated site.

And we'll address these minor Eslint warnings later (low priority).

Chapter 6 - command to register meme errors out

Describe the bug
The command mentioned in Chapter 6 to register a meme, fails with this error:

{"ExecutionError":"Exceeded the prepaid gas."}

Example failed transaction.

To Reproduce
Run this command with your testnet account:

near call museum.testnet add_meme \
'{"meme" : "bob", "title" : "god", "data" : "https://9gag.com/gag/ad8K0vj", "category" : 4}' \
--accountId YOUR_ACCOUNT_NAME.testnet --amount 3

Expected behavior
Meme creation should succeed, like this transaction.

Additional context
The command should be corrected to add gas as clarified by Benji on Discord. Working command is:

near call museum.testnet add_meme \
'{"meme" : "bobarana", "title" : "bobarana", "data" : "https://9gag.com/gag/ad8K0vj", "category" : 4}' \
--accountId maharana.testnet --amount 3 --gas=75000000000000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.