Can I add the same twitter app details in order to test this on a hosted instance?
I think the error occurs when the account that registers the app is different than the one that registered the channel.
Had the same idea. I checked it and it still donāt work.
I can definitely tell that this is not the case for me.
Iāve got a dev account at Twitter and my āVereinā doesnāt - the āVereinā does use the app I provide.
@bruce78 Iāll work something out for you to test, please provide a Zammad-URL via DM so I can enter it.
Any Feedback, @bruce78 ? 
@MrGeneration Hi Marcel
Iāll work something out for you to test, please provide a Zammad-URL via DM so I can enter it.
I didnāt get anything to test? Nothing in Zammad and nothing on Twitter, did you get my private message on this site?
@MrGeneration OK, see my PM for some testing resultsā¦
Just a small follow up for any one watching this: Weāre at it, a developer is taking a look.
When I need to guess I would say there is no news yet?
Iām afraid that youāre right 
Ok, the work-around below worked for me with a couple of caveatsā¦
- You need to find the channel ID from your browser when adding the twitter account, it just loads a url with the channel number at the end e.g.
https://orders.fetchthe.city/#channels/twitter/19or similar. I donāt know if there is another way to find the twitter channel ID? - The user ID comes from the error message in the log e.g.
E, [2019-02-20T09:56:26.187680 #5546-46915235956760] ERROR -- : No such channel for user id '123456789123456'! (Exce
/opt/zammad/app/controllers/channels_twitter_controller.rb:32:in `validate_webhook_signature!'
These are the commands I ran on the serverā¦
Does anyone know if this fix is upgrade safe?
Hey @bruce78, thanks for your efford!
Normally you would find that information via rails console with:
Channel.find_by(area: 'Twitter::Account')
But in your case it looks like the ID is invalid so hard to tell to be honest.
The solution martin provided is a permanent solution, this will be stored in your database and thus is update safe.
Yeah, I just made up the actual twitter ID for the public post but I found the real one in the logs without any problemsā¦
Itās good to know that this work-around is upgrade safe!
The workaround proposed by @martini also worked for us. Using Channel.find_by(area: 'Twitter::Account') to find the channel id from the console as suggested by @MrGeneration also worked.
Iāve noticed on all the zammad deployments Iāve managed where this occurs, the id in the database and the real id always differ by the last two digits.
Example:
- real id: 984608854112718848
- erroneous id saved by zammad: 984608854112718800
This also only happened on accounts where the id is very long number, not on accounts with shorter ids.
Could this be some sort of precision bug? Zammad is storing the id as a long/integer type. But it should probably be a string for safety.
More research:
Yes, Iām convinced this is the root of the problem. All the broken idās Iāve seen are greater than Number.MAX_SAFE_INTEGER in javascript.
I believe that when the twitter channel is added in zammad, the channelās roundtrip through the ui is breaking the value of the id.
Even Twitter themselves warn about this:
Tweet IDs can break Javascript
Use the id_str field instead of id whenever present to stay safe. Web browsers/Javascript interpreters/JSON consumers may munge large integer-based ids, which is why it is recommended to use the string representation.
Thanks for your feedback!
Weāll discuss this, this will proberbly a bug (or atleast an enhancement).
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
Hey @abelxluck I just wanted to let you know that this issue got some traction today and your investigation helped us to get on the right track (pretty fast). Thanks a lot! Fix is on the way!