kontron / redmine_oauth

Redmine authentication through OAuth.
GNU General Public License v2.0
57 stars 27 forks source link

wrong number of arguments (given 3, expected 2) #2

Closed CountRobel closed 1 year ago

CountRobel commented 1 year ago

Hey, thx for the plugin, working fine! (The Azure AD Login) With the Receive IMAP example i get following "errors":

ruby/lib/ruby/2.6.0/x64-mingw32/strscan.so: warning: already initialized constant StringScanner::Version /ruby/lib/ruby/2.6.0/x64-mingw32/strscan.so: warning: already initialized constant StringScanner::Id wrong number of arguments (given 3, expected 2)

Any Idea? best regards!

picman commented 1 year ago

I'd need Redmine and the plugin versions and an exact command you run.

CountRobel commented 1 year ago

I am using bitnami redmine 5.0.2-2, plugin 2.0.0 Command: C:\Bitnami\redmine-5.0.2-2\apps\redmine\htdocs>bundle exec rake redmine_oauth:email:receive_imap username='O365USERNAME' RAILS_ENV="production"

picman commented 1 year ago

I can't reproduce the error. However, I work on Linux. Can't you post a bit bigger chunk of the log to see which function call causes wrong number of arguments?

CountRobel commented 1 year ago

C:\Bitnami\redmine-5.0.2-2\apps\redmine\htdocs>bundle exec rake redmine_oauth:email:receive_imap username='O365USERNAME' RAILS_ENV="production" --trace C:/Bitnami/redmine-5.0.2-2/ruby/lib/ruby/2.6.0/x64-mingw32/strscan.so: warning: already initialized constant StringScanner::Version C:/Bitnami/redmine-5.0.2-2/ruby/lib/ruby/2.6.0/x64-mingw32/strscan.so: warning: already initialized constant StringScanner::Id ** Invoke redmine_oauth:email:receive_imap (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute redmine_oauth:email:receive_imap wrong number of arguments (given 3, expected 2)

I'll try it on a Linux machine

picman commented 1 year ago

No feedback => closing.

CountRobel commented 1 year ago

I've now tried it on Ubuntu and it works great! THX Do you know what to do so that a new ticket is created if there is no ticket number in the subject of the email?

picman commented 1 year ago

https://www.redmine.org/projects/redmine/wiki/RedmineReceivingEmails#How-it-works You have to also define mandatory issue's attributes: https://www.redmine.org/projects/redmine/wiki/RedmineReceivingEmails#Issue-attributes

CountRobel commented 1 year ago

Thank you!