Broken import session

Hi guys,

I was trying to bulk-import some gateway that unfortunately resulted in the error;
We’re sorry, but something went wrong.

There appears to be a double ID in the CSV file to be imported.
How can I cancel the current import session?

Nothing else besides the message is shown, a reboot also was to no avail.
This also broke the dialpeer import session.

Rebooting the system had no effect.
Is there a table to clear?

Kind regards,
Chris

Could you show error details(backtrace) from /var/log/yeti-admin.log ?

This is what I see with regard to opening the page;

Mar 25 19:49:26 voipswitch YETI-admin[1217]: [19:49:26.764532 ] [ INFO]: Started GET "/gateways/import" for 127.0.0.1 at 2019-03-25 19:49:26 +0100
Mar 25 19:49:26 voipswitch YETI-admin[1217]: [19:49:26.765853 ] [ INFO]: Processing by GatewaysController#import as HTML
Mar 25 19:49:26 voipswitch YETI-admin[1217]: [19:49:26.772713 ] [ INFO]: Redirected to http://voipswitch/importing_gateways
Mar 25 19:49:26 voipswitch YETI-admin[1217]: [19:49:26.773120 ] [ INFO]: Completed 302 Found in 7ms (ActiveRecord: 1.8ms)
Mar 25 19:49:26 voipswitch YETI-admin[1217]: [19:49:26.781223 ] [ INFO]: Started GET "/importing_gateways" for 127.0.0.1 at 2019-03-25 19:49:26 +0100
Mar 25 19:49:26 voipswitch YETI-admin[1217]: [19:49:26.787240 ] [ INFO]: Processing by ImportingGatewaysController#index as HTML
Mar 25 19:49:26 voipswitch YETI-admin[1217]: [19:49:26.803526 ] [ INFO]: Rendering vendor/bundle/ruby/2.3.0/gems/activeadmin-1.0.0/app/views/active_admin/resource/index.html.arb
Mar 25 19:49:26 voipswitch YETI-admin[1217]: [19:49:26.928944 ] [ INFO]: Rendered vendor/bundle/ruby/2.3.0/gems/activeadmin-1.0.0/app/views/active_admin/resource/index.html.arb (124.9ms)
Mar 25 19:49:26 voipswitch YETI-admin[1217]: [19:49:26.929492 ] [ERROR]: uninitialized constant Importing::Gateway::GatewayInbandDtmfFilteringMode
Mar 25 19:49:26 voipswitch YETI-admin[1217]: [19:49:26.929833 ] [ WARN]: /home/yeti-web/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.6/lib/active_record/inheritance.rb:166:in `compute_type'#012/home/yeti-web/vendor/bundle/ruby/2.3.0/g$
Mar 25 19:49:27 voipswitch YETI-admin[1217]: [19:49:27.283557 ] [ INFO]: Completed 500 Internal Server Error in 496ms
Mar 25 19:49:27 voipswitch YETI-admin[1217]: [19:49:27.284571 ] [FATAL]:
Mar 25 19:49:27 voipswitch YETI-admin[1217]: [19:49:27.284973 ] [FATAL]: NameError (uninitialized constant Importing::Gateway::GatewayInbandDtmfFilteringMode):
Mar 25 19:49:27 voipswitch YETI-admin[1217]: [19:49:27.285223 ] [FATAL]:
Mar 25 19:49:27 voipswitch YETI-admin[1217]: [19:49:27.285457 ] [FATAL]: app/controllers/concerns/error_notify.rb:12:in `inspect'#012app/controllers/concerns/error_notify.rb:12:in `inspect'#012app/controllers/concerns/error_notify.rb:12$

What version are you running? Could you show version information from page footer?

Copyright 2019 Yeti Admin ver: 1.7.14. Routing ver 20181114213545. CDR ver 20180911180345.

When I look in the database (data_import) I can see these values on NULL (table: import_gateways).
In the CSV I uploaded I noted:

Rx inband dtmf filtering mode Tx inband dtmf filtering mode
Inherit configuration from other call leg Inherit configuration from other call leg

Could this be related?

I’ve cleared the table and was able to cancel the import session.
Not sure what exactly went wrong.

I can replicate the issue by simply exporting the 5 (handmade) gateways and importing the same CSV file. Does anybody else experience the same issue?

CSV file should contain fields “Rx inband dtmf filtering mode name” and “Tx inband dtmf filtering mode name”. Try to rename CSV headers. But this is definitely bug - it should not crash even if some fields is missing.

Try to modify /home/yeti-web/app/models/importing/gateway.rb as described at https://github.com/yeti-switch/yeti-web/pull/461/files#diff-c286698b54550c0767e35359a0823712
restart yeti-web and try again