You need to migrate the form prior to use them in 17.1.
If the error appears right after login, my guess is that your roles use a custom menubar.
You can check for your menu bar using this query :
select * from usp_menu_bar
htmpl_name column will help you find wich file you need.
If you want to find wich role uses wich menubar, you need to use those 4 queries. I will let you join them
select * from usp_role
select * from usp_role_tab
select * from usp_tab
select * from usp_menu_bar
Hope this helps