Giter Club home page Giter Club logo

Comments (10)

ciricc avatar ciricc commented on May 26, 2024

Дело не в uploader'е. Проверьте, пожалуйста наличие ошибок при авторизаци. Видимо что-то идет не так и у вас не возвращается объект для работы с API

from easyvk.

get-web avatar get-web commented on May 26, 2024

Да не возвращается, но я уже не знаю что сделать. Создал пустой проект. Запускаю:

const easyvk = require("easyvk");
//Authenticating user
easyvk({
    username: 'тут логин',
    password: 'тут пароль',
    save: false
}).then(vk => {
    console.log(vk);
}).catch(console.error)

На версии 2.5.11 все нормально. на 2.6.1 не работает и этого нет:

uploader: EasyVKUploader { _vk: [Circular] },
  http:
   HTTPEasyVK {
     headersRequest: { 'content-type': 'application/x-www-form-urlencoded' },
     _vk: [Circular] },

Ошибок тоже никаких нет. Разные аккаунты пробовал, но результат один на версиях 2.6.1 и 2.6.0, другие не пробовал

from easyvk.

ciricc avatar ciricc commented on May 26, 2024

Сделай, пожалуйста, дебаг https://ciricc.github.io/debugger.html

from easyvk.

get-web avatar get-web commented on May 26, 2024
EventContext {
  type: 'request',
  moment: 2020-03-30T11:54:56.372Z,
  event:
   { url:
      'https://oauth.vk.com/token/?....',
     query:
      '....',
     method: 'GET' } }
EventContext {
  type: 'response',
  moment: 2020-03-30T11:54:57.203Z,
  event:
   { body:
      { access_token:
         'token',
        expires_in: 0,
        user_id: ... } } }
EventContext {
  type: 'request',
  moment: 2020-03-30T11:54:57.208Z,
  event:
   { url:
      'https://api.vk.com/method/users.get?....',
     query:
      { access_token:
         'token',
        v: '5.75',
        fields: '',
        client_id: '...',
        client_secret: '...',
        lang: 'undefined',
        '2fa_supported': 1 },
     method: 'GET' } }
EventContext {
  type: 'response',
  moment: 2020-03-30T11:54:57.843Z,
  event: { body: { response: [Array] } } }

Я удалил некоторые данные, не знаю какие именно нужны, но там логин, пароль, секретный ключ, токен, все пиходит

from easyvk.

ciricc avatar ciricc commented on May 26, 2024

Нужно видеть что приходит в ответах. (Response).

from easyvk.

get-web avatar get-web commented on May 26, 2024

Подключил:

let myDebugger = new Debugger();

myDebugger.on('response', (event) => {
    console.log(event.toString())
})

Получил:

[Mon Mar 30 2020 15:55:58 GMT+0300 (GMT+03:00)]
{
  "type": "response",
  "moment": "2020-03-30T12:55:58.593Z",
  "event": {
    "body": {
      "access_token": "access_token",
      "expires_in": 0,
      "user_id": user_id
    }
  }
}
[Mon Mar 30 2020 15:55:59 GMT+0300 (GMT+03:00)]
{
  "type": "response",
  "moment": "2020-03-30T12:55:59.271Z",
  "event": {
    "body": {
      "response": [
        {
          "id": id,
          "first_name": "first_name",
          "last_name": "last_name"
        }
      ]
    }
  }
}

from easyvk.

ciricc avatar ciricc commented on May 26, 2024

Не понимаю пока что почему это происходит. Если можешь, пожалуйста посмотри в коде easyvk. Подебаж его. У меня в ближайшее время такой возможности не будет. Я выпущу фикс, если что найдешь

from easyvk.

get-web avatar get-web commented on May 26, 2024

Зря тему закрыли, проблема не решилась, сегодня решил запустить последнюю версию "2.7.41" проблема та же, так и сижу на версии 2.5.11

Да, кстати. Менял разные версии node от 10 до последней стабильной 12.18.3

from easyvk.

get-web avatar get-web commented on May 26, 2024

Последняя версия 2.8.1 вроде заработала, по крайней мере примеры из документации работают, думаю можно закрывать. Спасибо.

from easyvk.

ciricc avatar ciricc commented on May 26, 2024

Отлично

from easyvk.

Related Issues (14)

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.