Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

telegram integration fileinfo bug #140

Open
jwickens opened this issue May 10, 2017 · 3 comments
Open

telegram integration fileinfo bug #140

jwickens opened this issue May 10, 2017 · 3 comments

Comments

@jwickens
Copy link

When trying out the telegram integration with the following code

const { telegramOpts } = require('./config')
const BroidTelegram = require('@broid/telegram')

const telegram = new BroidTelegram(telegramOpts)

telegram.connect()
  .subscribe({
    next: data => console.log(`connected: ${JSON.stringify(data)}`),
    error: err => console.error(`Something went wrong: ${err.message}`),
    complete: () => console.log('complete connected')
  })

telegram.listen()
  .subscribe({
    next: data => console.log(`Received message: ${JSON.stringify(data)}`),
    error: err => console.error(`Something went wrong: ${err.message}`),
    complete: () => console.log('message stream complete')
  })

( Note it took me a while to get here -- some better getting started docs mentioning the listen would be greatly helpful for beginners)

Then on sending a message with telegram i immediately get an error

{
    "pid": 20568,
    "hostname": "Jonathans-MacBook-Pro.local",
    "name": "fileInfo",
    "level": 50,
    "time": 1494410031413,
    "msg": "ENOENT: no such file or directory, open 'boo'",
    "type": "Error",
    "stack": "Error: ENOENT: no such file or directory, open 'boo'
      at Object.fs.openSync (fs.js:584:18)
      at Function.module.exports.sync (/Users/jonathanwickens/dev/h-broid-conversation/node_modules/read-chunk/index.js:32:16)
      at Promise.resolve.then (/Users/jonathanwickens/dev/h-broid-conversation/node_modules/@broid/utils/lib/index.js:34:35)
      at tryCatcher (/Users/jonathanwickens/dev/h-broid-conversation/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/Users/jonathanwickens/dev/h-broid-conversation/node_modules/bluebird/js/release/promise.js:512:31)
      at Promise._settlePromise (/Users/jonathanwickens/dev/h-broid-conversation/node_modules/bluebird/js/release/promise.js:569:18)
      at Promise._settlePromiseCtx (/Users/jonathanwickens/dev/h-broid-conversation/node_modules/bluebird/js/release/promise.js:606:10)
      at Async._drainQueue (/Users/jonathanwickens/dev/h-broid-conversation/node_modules/bluebird/js/release/async.js:138:12)
      at Async._drainQueues (/Users/jonathanwickens/dev/h-broid-conversation/node_modules/bluebird/js/release/async.js:143:10)
      at Immediate.Async.drainQueues (/Users/jonathanwickens/dev/h-broid-conversation/node_modules/bluebird/js/release/async.js:17:14)
      at runCallback (timers.js:672:20)
      at tryOnImmediate (timers.js:645:5)
      at processImmediate [as _immediateCallback] (timers.js:617:5)",
    "errno": -2,
    "code": "ENOENT",
    "syscall": "open",
    "path": "boo",
    "v": 1
}
Received message: {
    "@context": "https://www.w3.org/ns/activitystreams",
    "generator": {
        "id": "593b3328-38c0-4816-b162-6faf0e9c42c1",
        "name": "telegram",
        "type": "Service"
    },
    "published": 1494410031,
    "type": "Create",
    "actor": {
        "id": "282883177",
        "name": "Jonathan Wickens",
        "type": "Person"
    },
    "target": {
        "id": "282883177",
        "name": "Jonathan Wickens",
        "type": "Person"
    },
    "object": {
        "content": "boo",
        "id": "50",
        "type": "Note"
    }
}
@killix
Copy link
Collaborator

killix commented May 10, 2017

"msg": "ENOENT: no such file or directory, open ', this message look it's something on you code side and not in the integration. Can you give me your complete gist to look?

@m90
Copy link
Contributor

m90 commented May 10, 2017

I'm 99% sure this is the same as: #131

@jwickens
Copy link
Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants