Comments (10)
Дело не в uploader'е. Проверьте, пожалуйста наличие ошибок при авторизаци. Видимо что-то идет не так и у вас не возвращается объект для работы с API
from easyvk.
Да не возвращается, но я уже не знаю что сделать. Создал пустой проект. Запускаю:
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.
Сделай, пожалуйста, дебаг https://ciricc.github.io/debugger.html
from easyvk.
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.
Нужно видеть что приходит в ответах. (Response).
from easyvk.
Подключил:
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.
Не понимаю пока что почему это происходит. Если можешь, пожалуйста посмотри в коде easyvk. Подебаж его. У меня в ближайшее время такой возможности не будет. Я выпущу фикс, если что найдешь
from easyvk.
Зря тему закрыли, проблема не решилась, сегодня решил запустить последнюю версию "2.7.41" проблема та же, так и сижу на версии 2.5.11
Да, кстати. Менял разные версии node от 10 до последней стабильной 12.18.3
from easyvk.
Последняя версия 2.8.1 вроде заработала, по крайней мере примеры из документации работают, думаю можно закрывать. Спасибо.
from easyvk.
Отлично
from easyvk.
Related Issues (14)
- Не работает загрузка файлов HOT 1
- self._vk.error is not a function widgets.js HOT 1
- Crash HOT 1
- Request is deprecated HOT 2
- Fatal Error HOT 2
- UnhandledPromiseRejectionWarning
- Клавиатура
- перестал работать uploadFetchedFile
- Не ставится
- UnhandledPromiseRejectionWarning: Error при частом запуске client.audio.search HOT 2
- UnhandledPromiseRejectionWarning в audio.get при заданном offset HOT 4
- И ещё пара важных багов HOT 8
- Encoding of https response HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easyvk.