GithubHelp home page GithubHelp logo

cei-api's People

Contributors

barbosagabriel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cei-api's Issues

Problem with CEI-API + App Engine of Google Cloud

I deployed the scritp in the Google Cloud AppEngine as you mentioned that you also did, but I'm having problems running it in the Browser or Insomnia.
The / token function works perfectly.

When I try to perform the functions:
/wallet
/transactions
/dividends

When I run on my machine locally it works perfectly.
But in the browser I get this message:

Error: Server Error
The server encountered an error and could not complete your request.
Please try again in 30 seconds.

And I get the following error in the App Engine logs:

I 2020-08-05T20:33:01.888646Z GET 200 259 B 5,8 s Chrome 84 / GET 200 259 B 5,8 s Chrome 84 5f2b177d00ff0d8f461f573e960001697e6170692d353030393038373230363537343335313930362d3636363731390001323032303038303574313731383037000100
W 2020-08-05T20:33:11.340270Z GET 500 0 B 9,2 s Chrome 84 /wallet GET 500 0 B 9,2 s Chrome 84 5f2b178700ff05312ef63d0b720001697e6170692d353030393038373230363537343335313930362d3636363731390001323032303038303574313731383037000100
A 2020-08-05T20:33:11.394451Z Searching wallet - Current date
A 2020-08-05T20:33:15.879413Z Logging at CEI...
A 2020-08-05T20:33:17.379446Z Error: Error: Protocol error (Target.createTarget): Target closed.
A 2020-08-05T20:33:17.379467Z at /workspace/node_modules/cei-crawler/node_modules/puppeteer/lib/Connection.js:74:56
A 2020-08-05T20:33:17.379477Z at new Promise ()
A 2020-08-05T20:33:17.379487Z at Connection.send (/workspace/node_modules/cei-crawler/node_modules/puppeteer/lib/Connection.js:73:12)
A 2020-08-05T20:33:17.379496Z at Browser._createPageInContext (/workspace/node_modules/cei-crawler/node_modules/puppeteer/lib/Browser.js:174:47)
A 2020-08-05T20:33:17.379505Z at BrowserContext.newPage (/workspace/node_modules/cei-crawler/node_modules/puppeteer/lib/Browser.js:367:26)
A 2020-08-05T20:33:17.379512Z at Browser.newPage (/workspace/node_modules/cei-crawler/node_modules/puppeteer/lib/Browser.js:166:33)
A 2020-08-05T20:33:17.379520Z at Browser. (/workspace/node_modules/cei-crawler/node_modules/puppeteer/lib/helper.js:112:23)
A 2020-08-05T20:33:17.379528Z at CeiCrawler._callee2$ (/workspace/node_modules/cei-crawler/app.js:547:38)
A 2020-08-05T20:33:17.379536Z at tryCatch (/workspace/node_modules/regenerator-runtime/runtime.js:63:40)
A 2020-08-05T20:33:17.379554Z at Generator.invoke [as _invoke] (/workspace/node_modules/regenerator-runtime/runtime.js:293:22)
A 2020-08-05T20:33:17.379565Z -- ASYNC --
A 2020-08-05T20:33:17.379573Z at Browser. (/workspace/node_modules/cei-crawler/node_modules/puppeteer/lib/helper.js:111:15)
A 2020-08-05T20:33:17.379580Z at CeiCrawler._callee2$ (/workspace/node_modules/cei-crawler/app.js:547:38)
A 2020-08-05T20:33:17.379589Z at tryCatch (/workspace/node_modules/regenerator-runtime/runtime.js:63:40)
A 2020-08-05T20:33:17.379605Z at Generator.invoke [as _invoke] (/workspace/node_modules/regenerator-runtime/runtime.js:293:22)
A 2020-08-05T20:33:17.379615Z at Generator.next (/workspace/node_modules/regenerator-runtime/runtime.js:118:21)
A 2020-08-05T20:33:17.379627Z at asyncGeneratorStep (/workspace/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
A 2020-08-05T20:33:17.379641Z at _next (/workspace/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
A 2020-08-05T20:33:17.379652Z at processTicksAndRejections (internal/process/task_queues.js:97:5)

Please help-me, thankyou.

Problema no Token

Estou tendo problema na hora de verificar o Token, estou com o serviço da API hospedado no GCloud AppEngine.

Utilizando esse caminho da api, agora está dando problema, ele não consegue mais utilizar o token gerado aqui.

Startei outro serviço na minha máquina local e mandei gerar o token com o mesmo login e senha, e gerou um token diferente do que possuí na API do AppEngine.

Como eu faço pra fazer esse tratamento e atualizar o Token que está salvo no SQLite? Aparentemente o processo de gerar token não gera sempre o mesmo token para o usuário e senha.

Vou tentar mandar ele gerar e gravar um token quando ocorrer esse tipo de falha.
Qualquer avanço relato aqui.

A princípio o erro que consegui localizar é o seguinte:

(node:14592) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'username' of null
at G:\CriarAPPS\Fundamentos\APIs\CEIAPPI\public\src\controllers\CEIController.ts:87:15
at step (G:\CriarAPPS\Fundamentos\APIs\CEIAPPI\public\src\controllers\CEIController.ts:33:23)
at Object.next (G:\CriarAPPS\Fundamentos\APIs\CEIAPPI\public\src\controllers\CEIController.ts:14:53)
at fulfilled (G:\CriarAPPS\Fundamentos\APIs\CEIAPPI\public\src\controllers\CEIController.ts:5:58)
(Use node --trace-warnings ... to show where the warning was created)
(node:14592) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:14592) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:14592) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

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.