Appcelerator studio Titanium: Ti.Network.createCookie is not a function - titanium

this is my code:
Ti.Network.addHTTPCookie(Ti.Network.createCookie({
path: currentCookie4,
name: currentCookie2,
value: currentCookie3,
httponly: true,
}));
I got an error saying
Uncaught TypeError: Ti.Network.createCookie is not a function
For some reason Ti.Network.createCookie is undefined. Does anybody know why?

Related

AAD B2C (MSAL) with Expo and react-native-msal error on init

I'm using expo#4.5.2 and react-native-msal#4.0.0
I've copied the B2CClient class from b2cClient.ts provided in the example directory of react-native-msal and my initialization is set up the same as in App.tsx example provided as well (https://github.com/stashenergy/react-native-msal/tree/master/example/src).
My configuration is the following:
auth: {
clientId: '<CLIENT_ID>',
authorityBase: 'https://example.b2clogin.com/tfp/example.onmicrosoft.com',
policies: {
signInSignUp: 'B2C_1_mySignupPolicy',
passwordReset: 'B2C_1_myPasswordResetPolicy',
},
redirectUri: Platform.select({
android: 'msauth://com.company.app/l5rSw0yVmvlj7l5rSw0yWAYk5tfVb2j%2F',
default: undefined,
}),
},
I've done the additional step for expo (https://github.com/stashenergy/react-native-msal/blob/master/docs/expo_setup.md). But I get a warning in my editor: Failed to resolve plugin for module "react-native-msal" (I'm using the same version of react-native-msal that was used when the setup example was written)
I can still build the app regardless of this warning. But when b2cClient.init() runs I get this error:
[TypeError: null is not an object (evaluating '_nativeModule.default.createPublicClientApplication')]
Supposedly this package should work with expo and my configuration is the same as the example. How do I fix this?

Vue 2 - TypeError: Cannot read properties of undefined (reading '_router')

I'm upgrading the package okta/okta-vue from version 1.3.0 to 3.1.0.
It also included installation of okta-auth-js package since version 2.0.0 of okta/okta-vue.
I followed the migration info according to the changelog and the migration guide:
https://github.com/okta/okta-vue/blob/okta-vue-3.2.0/CHANGELOG.md
https://github.com/okta/okta-vue/blob/okta-vue-3.2.0/MIGRATING.md
After following the guides, I recieve errors that seem to repeat themselves in the console such as:
[Vue warn]: Error in beforeCreate hook: "TypeError: Cannot read properties of undefined (reading '_router')"
TypeError: Cannot read properties of undefined (reading '_router')
TypeError: guard is not a function
[vue-router] uncaught error during route navigation:
The 3 first errors repeat themselves several times.
I tried looking on other topics and saw some answers speaking about "this" which might cause the problem, but it doesn't seem to be the issue in my case.
Following is the routes.js code:
import DashboardLayout from 'src/components/Dashboard/Layout/DashboardLayout.vue'
import Overview from 'src/components/Dashboard/Views/Dashboard/Overview.vue'
// import Auth from '#okta/okta-vue'
import { LoginCallback } from '#okta/okta-vue'
import {
routes_App1,
routes_App3,
routes_App4,
...,
routes_App99
} from './routesDefinition'
// Dashboard Pages
const UserProfile = () => import ('src/components/Dashboard/Views/Pages/UserProfile.vue')
const routes = [
{
path: '/implicit/callback',
name: 'Okta Callback',
component: LoginCallback
// component: Auth.handleCallback()
}, {
path: '/',
component: DashboardLayout,
redirect: '/overview',
meta: {
requiresAuth: true
},
children: [
{
base: '/',
path: 'overview',
name: 'Overview',
component: Overview
},
{
path: 'userprofile',
name: 'User Profile',
component: UserProfile
},
routes_App1,
routes_App3,
routes_App4,
...,
routes_App99
]
}, {
path: '*',
component: DashboardLayout,
redirect: '/overview',
meta: {
requiresAuth: true
}
},
]
export default routes
If for any reason it matters, my company's app is written with Vue 2 in the fronted and PHP - Laravel in the backend.
The app worked completely fine before upgrading the package.
Here are some of the related packages versions I'm using (after the upgrade):
vue#2.7.10, vue-router#3.6.4, #okta/okta-auth-js#4.9.2, #okta/okta-vue#3.1.0, webpack#5.74.0
If there's any other important files I need to attach as code please let me know and I'll add them.
Please help me if anyone knows what might be the solution for those errors.
Edit: I upgraded to Webpack 5.74 recently and it didn't change anything.
Thanks in advance, Gady.

Uncaught (in promise) TypeError: Illegal constructor at new SvelteElement (index.mjs:1381)

Uncaught promise when registering a custom element using the latest
sapper, svelte, nodeJS, and rollup stack using the following
statements.
REPL example: https://svelte.dev/repl/489ee8acd10848b0bb1feb2535bd6cc5?version=3.16.5 created locally
<svelte:options tag="parlax-background" />
& rollup.config.js
export default {
client: {
input: config.client.input(),
output: config.client.output(),
plugins: [
replace({...})
svelte({
dev: !production,
customElement: true,
// and tried also with customElement: { tag: "my-element"}
hydratable: true,
emitCss: true
I want to mention that I had tested on a fresh project
Logs
[Client Side]
=> Uncaught (in promise) TypeError: Illegal constructor
at new SvelteElement (index.mjs:1381)
[Server Side]
=> The 'tag' option is used when generating a custom element. Did you forget the 'customElement: true' compile option?
44: <svelte:options tag="my-element" />
1. When I registering [ **customElement: true ] in the config i get**
2. If I do not register my element in the config I do not get any error, but neither my element is registered :(
Ref: https://github.com/sveltejs/svelte/issues/4132
As described in the referenced GitHub issue, once you configure the Svelte compiler with customElements: true, you're expected to provide an element tag for all your components (using <svelte:options tag="my-component"/>.
In your REPL's example, this would mean updating App.svelte with e.g. <svelte:options tag="my-app"/>
When you now run the app, you should not see the error in the console anymore, but a working app.

How do I get the Aurelia-cli to provide a stack trace on a gulp plugin error?

To any Aurelia CLI pros out there:
I've successfully got karma code coverage setup and mapping the bundled output back to my typescript sources, but the karma plugin is throwing an error when generating the output. See here:
{ uid: 0,
name: 'unit',
branch: false,
error:
{ [TypeError: Cannot read property 'split' of null]
domain:
Domain {
domain: null,
_events: {},
_eventsCount: 0,
_maxListeners: undefined,
members: [] },
domainThrown: true },
duration: [ 1, 611956616 ],
time: 1474556751202 }
{ [TypeError: Cannot read property 'split' of null]
domain:
Domain {
domain: null,
_events: {},
_eventsCount: 0,
_maxListeners: undefined,
members: [] },
domainThrown: true }
How do I tell the CLI to give me the stack trace so that I can go and fix the issue in the plugin?
Here is a project that demonstrates the problem:
https://github.com/Roustalski/aurelia-typescript-coverage
Follow the instructions in the README.
You can actually step through CLI: How to debug Aurelia CLI
TL:DR Using vscode you can setup launch target for node and execute cli with debugger attached.

Video.js Conflict with Slidebars.js Or Mmenu.js

Im doing a video site and required to have video.js on the site. But i also need a push menu so i used first mmenu. The problem is my video player stops when the js of mmenu is loaded. Same happens when i tried slidebars.js. When i remove them the player works fine.
here are some errors i got but i also see this even the video is working fine.
Video Error
_V_.Event
altKey: undefined
attrChange: undefined
attrName: undefined
bubbles: false
button: undefined
cancelable: false
charCode: undefined
clientX: undefined
clientY: undefined
ctrlKey: undefined
currentTarget: video#example_video_1_html5_api.vjs-tech
data: undefined
detail: undefined
eventPhase: 2
fromElement: undefined
handler: undefined
isDefaultPrevented: function returnFalse(){return false}
isPropagationStopped: function returnTrue(){return true}
keyCode: undefined
metaKey: undefined
newValue: undefined
offsetX: undefined
offsetY: undefined
originalEvent: Event
pageX: undefined
pageY: undefined
prevValue: undefined
relatedNode: undefined
relatedTarget: undefined
result: undefined
screenX: undefined
screenY: undefined
shiftKey: undefined
srcElement: video#example_video_1_html5_api.vjs-tech
target: div#example_video_1.video-js.vjs-default-skin.vjs-paused
timeStamp: 1402109749287
toElement: undefined
type: "error"
vdata1402109746116: true
view: undefined
wheelDelta: undefined
which: undefined
__proto__: Object