I created stores with script in Magento 2.1 But I face an issue when I tried to access the store it returns 404 pages.
I tried to create a store from admin, and the store i created from admin. It works in frontend.
I do reindexing, Upgrade, Compile, and every basic step in Magento 2 debug.
I follow this to create a store view.