Closed mbokil closed 1 year ago
Thanks for submitting this issue Internal ref: OKTA-552367
After researching this problem more I discovered it is a problem with Vite and Vue files conflicting. It is not a bug if you are using the latest Vue, Vite, and Vue plugin to build your app. You will need the following for Vite to build correctly: "@vitejs/plugin-vue": "^4.0.0", "vite": "^4.1.1", "vue": "^3.2.47",
Describe the bug?
I updated our Okta project to Vue 3.2.45 and there is an error being thrown by okta-vue.ts.
What is expected to happen?
Module should load without any errors in Vue.
What is the actual behavior?
okta-vue.ts throws a TypeError and the app fails to run until the browser window is refreshed.
Uncaught (in promise) TypeError: 'set' on proxy: trap returned falsish for property 'authState' at Proxy.created (okta-vue.ts:127:12) at callWithErrorHandling (runtime-core.esm-bundler.js:157:36) at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:166:21) at callHook (runtime-core.esm-bundler.js:3590:5) at applyOptions (runtime-core.esm-bundler.js:3492:9) at finishComponentSetup (runtime-core.esm-bundler.js:7368:9) at handleSetupResult (runtime-core.esm-bundler.js:7312:5) at setupStatefulComponent (runtime-core.esm-bundler.js:7275:13) at setupComponent (runtime-core.esm-bundler.js:7201:11) at mountComponent (runtime-core.esm-bundler.js:5524:13)
Reproduction Steps?
Upgrade the hello world Vue project to Vue 3.2.45.
SDK Versions
@okta/okta-auth-js": "^7.0.1" @okta/okta-vue": "^5.5.0"
Execution Environment
NodeJS 14 with Vite compiler.
Additional Information?
Rolling back to Vue 3.2.44 fixes the TypeError thrown.