Edge extension says "Wants access to this site", and has red background - microsoft-edge-extension

My Edge extension's manifest.json contains the following sections:
{
"permissions": [
"storage",
"unlimitedStorage",
"cookies",
"tabs",
"notifications",
"webRequest",
"webRequestBlocking",
"nativeMessaging",
"http://*/*",
"https://*/*",
"<all_urls>"
],
"content_scripts": [
{
"matches": ["<all_urls>"],
"exclude_matches": ["http://*.highpin.cn/ResumeManage/ResumeList*"],
"js": [
"libs/jquery/jquery-2.0.3.min.js",
"libs/pako/pako.min.js",
"js/shared/config.js",
"js/content/content_loader.js"
]
}
],
}
This happens in some Edge browsers. Only users can click it to use it.

Related

How to add organization,mobileno,email from bulk user endpoint "https://localhost:9443/t/carbon.super/scim2/Bulk" in WSO2IS

I used "https://localhost:9443/t/carbon.super/scim2/Bulk" to upload bulk users to WSO2IS. How to add organization,email and mobileno to following data set.
Here is my data object.
{
"failOnErrors": 1,
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:BulkRequest"
],
"Operations": [
{
"method": "POST",
"path": "/Users",
"bulkId": "qwerty1",
"data": {
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
],
"userName": "Alexwso26.com",
"password": "12345678",
"name": {
"givenName": "Alex26 ",
"familyName": "Silva26"
},
"emails": [
{
"type": "home",
"value": "Alex26#g.com",
"primary": true
}
]
}
}
]
}
It is working fine. But email didn't update.
From your user creation payload, it updates the user's home email. If you Navigate to the Management console -> Main menu -> Claims -> List -> "http://wso2.org/claims" -> Emails - Home Email-> Edit and tick Supported by Default, and view that created user's profile. You can see that the given value has been updated.
Change the email attribute like the following payload. Then you can update the Email attribute of the user. Also, the following payload contains the attribute format for mobile number and organization.
{
"failOnErrors": 1,
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:BulkRequest"
],
"Operations": [
{
"method": "POST",
"path": "/Users",
"bulkId": "qwerty1",
"data": {
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User",
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
],
"userName": "Alexwso26.com",
"password": "12345678",
"name": {
"givenName": "Alex26 ",
"familyName": "Silva26"
},
"emails": [
{
"value": "Alex26#g.com",
"primary": true
}
],
"phoneNumbers": [
{
"value": "0771234567",
"type": "mobile"
}
],
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User" : {
"organization": "abc"
}
}
}
]
}
Refer to the following documents when forming payload when creating or managing users/groups via SCIM endpoint.
https://anuradha-15.medium.com/how-to-add-scim-extended-attributes-in-wso2-identity-server-71621f62c5d3
https://www.rfc-editor.org/rfc/rfc7643

Alexa smart home skill development: Device discovery not working

I am currently developing a smart home skill for my blinds, however I am unable to discover device. Is there a way for me to validate my Discovery response message? I'm thinking this is some logical error in the JSON.
I'm using a Lambda function to perform the requests to my API using node-fetch and async/await, thus I have tagged all JS function as async, this could be another potential cause of this issue. I don't get any errors in CloudWatch either.
This is the response my Lambda function is sending:
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"payloadVersion": "3",
"messageId": "0a58ace0-e6ab-47de-b6af-b600b5ab8a7a"
},
"payload": {
"endpoints": [
{
"endpointId": "com-tobisoft-rollos-1",
"manufacturerName": "tobisoft",
"description": "Office Blinds",
"friendlyName": "Office Blinds",
"displayCategories": [
"INTERIOR_BLIND"
],
"capabilities": [
{
"type": "AlexaInterface",
"interface": "Alexa.RangeController",
"instance": "Blind.Lift",
"version": "3",
"properties": {
"supported": [
{
"name": "rangeValue"
}
],
"proactivelyReported": true,
"retrievable": true
},
"capabilityResources": {
"friendlyNames": [
{
"#type": "asset",
"value": {
"assetId": "Alexa.Setting.Opening"
}
}
]
},
"configuration": {
"supportedRange": {
"minimumValue": 0,
"maximumValue": 100,
"precision": 1
},
"unitOfMeasure": "Alexa.Unit.Percent"
},
"semantics": {
"actionMappings": [
{
"#type": "ActionsToDirective",
"actions": [
"Alexa.Actions.Close"
],
"directive": {
"name": "SetRangeValue",
"payload": {
"rangeValue": 100
}
}
},
{
"#type": "ActionsToDirective",
"actions": [
"Alexa.Actions.Open"
],
"directive": {
"name": "SetRangeValue",
"payload": {
"rangeValue": 1
}
}
},
{
"#type": "ActionsToDirective",
"actions": [
"Alexa.Actions.Lower"
],
"directive": {
"name": "AdjustRangeValue",
"payload": {
"rangeValueDelta": 10,
"rangeValueDeltaDefault": false
}
}
},
{
"#type": "ActionsToDirective",
"actions": [
"Alexa.Actions.Raise"
],
"directive": {
"name": "AdjustRangeValue",
"payload": {
"rangeValueDelta": -10,
"rangeValueDeltaDefault": false
}
}
}
],
"stateMappings": [
{
"#type": "StatesToValue",
"states": [
"Alexa.States.Closed"
],
"value": 100
},
{
"#type": "StatesToRange",
"states": [
"Alexa.States.Open"
],
"range": {
"value": 0
}
}
]
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
}
]
}
}
}
Thanks for any help.
Is there a way for me to validate my Discovery response message?
Yes, you could use the Alexa Smart Home Message JSON Schema. This schema can be used for message validation during skill development, it validates Smart Home skills (except the Video Skills API).
This is the response my Lambda function is sending
I've validated your response following this steps, the result: no errors found, the JSON validates against the schema. So, there's probably another thing going on. I suggest getting in touch with Alexa Developer Contact Us

Problem with my Native C++ Addon in Electron in Mac

I am writing code to load c++ dynamic library from electron. When trying it in Mac I get the following error:
dyld: Symbol not found: __ZN15FcDrive2Library13InitDrive2LibEv
Referenced from: /Users/nikhell/Documents/Codelathe/Workspace/cl-fc-client/electron-drive-client/build/Release/electronToCppBridge.node
Expected in: flat namespace
My binding.gyp file looks like this:
{
"targets":[
{
"target_name": "electronToCppBridge",
"cflags!": [ "-fno-exceptions" ],
"cflags_cc!": [ "-fno-exceptions" ],
'include_dirs': [
"<!#(node -p \"require('node-addon-api').include\")"
],
'dependencies': [
"<!(node -p \"require('node-addon-api').gyp\")"
],
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
"copies":[
{
'destination': './node_modules/electron/dist',
'files':[
'../../cl-fc-client/release/support/common/clientca.pem',
'../../cl-fc-client/release/support/common/clientcert.pem',
'../../cl-fc-client/clouddrive2/config.xml',
'../../cl-fc-client/release/support/prebuilt/translationsdc.zip'
]
},
{
'destination': './src',
'files':['../cloudDrive2Lib/LibraryEntry/cloudDrive2Library.h']
}
],
"conditions":[
["OS=='win'",
{
"copies":[
{
'destination': './build/Release',
'files':[
'../../cl-fc-client-thirdparty/bugtrap/BugTrapU-x64.dll',
'../build/bin/msvc/Release64/cloudDrive2Lib.dll',
'../../cl-fc-client-thirdparty/openssl/1.0.2j/lib/x86_64-win32/ssleay32MD.dll',
'../../cl-fc-client-thirdparty/poco/1.7.5/bin64/PocoZip64.dll',
'../../cl-fc-client-thirdparty/poco/1.7.5/bin64/PocoXML64.dll',
'../../cl-fc-client-thirdparty/poco/1.7.5/bin64/PocoUtil64.dll',
'../../cl-fc-client-thirdparty/poco/1.7.5/bin64/PocoNetSSL64.dll',
'../../cl-fc-client-thirdparty/poco/1.7.5/bin64/PocoNet64.dll',
'../../cl-fc-client-thirdparty/poco/1.7.5/bin64/PocoJSON64.dll',
'../../cl-fc-client-thirdparty/poco/1.7.5/bin64/PocoFoundation64.dll',
'../../cl-fc-client-thirdparty/poco/1.7.5/bin64/PocoCrypto64.dll',
'../../cl-fc-client-thirdparty/openssl/1.0.2j/lib/x86_64-win32/libeay32MD.dll'
]
},
{
'destination': './libs',
'files':['../build/bin/msvc/Release64/cloudDrive2Lib.lib']
},
],
"sources": [
"src/electronToCppBridge.cc",
],
}
],
["OS=='mac'",
{
"copies":[
{
'destination': './build/Release',
'files':[
'../build/bin/darwin/release/libfileclouddrive2lib.dylib',
'../../cl-fc-client-thirdparty/poco/1.7.5/lib/Darwin/x86_64/libPocoCrypto.45.dylib',
'../../cl-fc-client-thirdparty/poco/1.7.5/lib/Darwin/x86_64/libPocoFoundation.45.dylib',
'../../cl-fc-client-thirdparty/poco/1.7.5/lib/Darwin/x86_64/libPocoJSON.45.dylib',
'../../cl-fc-client-thirdparty/poco/1.7.5/lib/Darwin/x86_64/libPocoNet.45.dylib',
'../../cl-fc-client-thirdparty/poco/1.7.5/lib/Darwin/x86_64/libPocoNetSSL.45.dylib'
]
},
{
'destination': './libs',
'files':[
'../build/bin/darwin/release/libfileclouddrive2lib.dylib'
]
},
],
"sources": [
"src/electronToCppBridge.cc",
"libs/libfileclouddrive2lib.dylib",
],
}
]
],
}
]
}
Its working in windows. In Mac I have tried reinstalling the node modules and electron-rebuild also. None of them works for me. Th dylib is getting copied successfully besides the native .node module. Dont know why this link error is coming
Never mind. I realized that the link_dependencies tag needs to be added in binding.gyp. Also the dylib needs to be copied at the root of the project.

Telling Jest to not mock /moment(-timezone)?/ not working

Getting an error with jest where anytime moment/moment.tz() is called, TypeError: (0 , _moment2.default)(...).tz is not a function is thrown. Below is my jest config with absolute paths redacted.
{
"configs": [
{
"automock": false,
"browser": false,
"cache": true,
"cacheDirectory": "<absolute path>",
"clearMocks": true,
"coveragePathIgnorePatterns": [
"/node_modules/"
],
"globals": {
"window": true
},
"haste": {
"providesModuleNodeModules": []
},
"moduleDirectories": [
"node_modules",
"src"
],
"moduleFileExtensions": [
"js",
"vue"
],
"moduleNameMapper": [
[
"^#/(.*)$",
"/<absolute path>/src/$1"
],
[
"\\.(css|less)$",
"/<absolute path>/test/__mocks__/styleMock.js"
]
],
"modulePathIgnorePatterns": [],
"name": "79986797be68f3008e950f2cefe0bbd1",
"resetMocks": false,
"resetModules": false,
"rootDir": "<absolute path>",
"roots": [
"<absolute path>/src",
"<absolute path>/test"
],
"runner": "jest-runner",
"setupFiles": [],
"snapshotSerializers": [
"/<absolute path>/node_modules/jest-serializer-html/index.js"
],
"testEnvironment": "jest-environment-jsdom",
"testMatch": [
"**/__tests__/**/*.js?(x)",
"**/?(*.)(spec|test).js?(x)"
],
"testPathIgnorePatterns": [
"node_modules/",
"test/e2e/"
],
"testRegex": "",
"testRunner": "/<absolute path>/node_modules/jest-jasmine2/build/index.js",
"testURL": "about:blank",
"timers": "real",
"transform": [
[
".*\\.(vue)$",
"/<absolute path>/node_modules/vue-jest/vue-jest.js"
],
[
".*\\.js$",
"/opt/cm/cm_frontend/cm/node_modules/babel-jest/build/index.js"
]
],
"transformIgnorePatterns": [
"/node_modules/"
],
"unmockedModulePathPatterns": [
"moment",
"moment-timezone"
],
"watchPathIgnorePatterns": []
}
],
"globalConfig": {
"bail": false,
"changedFilesWithAncestor": false,
"collectCoverage": true,
"collectCoverageFrom": [
"src/components/**/*.{js,vue}",
"src/mixins/**/*.js",
],
"coverageDirectory": "<ABSOLUTE PATH>",
"coverageReporters": [
"json",
"text",
"lcov",
"clover"
],
"expand": false,
"listTests": false,
"mapCoverage": true,
"maxWorkers": 7,
"noStackTrace": false,
"nonFlagArgs": [],
"notify": false,
"rootDir": "<ROOT PATH HERE>",
"runTestsByPath": false,
"testFailureExitCode": 1,
"testPathPattern": "",
"testResultsProcessor": null,
"updateSnapshot": "new",
"useStderr": false,
"verbose": false,
"watch": false,
"watchman": true
},
"version": "21.2.1"
}
I've tried telling jest to jest.dontMock() as well as jest.unmock() but to no avail.
I've also tried require.requireActual().
I want to only mock moment when I specify per test (per file) with jest.mock().
What could be causing these issues? I am not mocking or unmocking moment anywhere in my test files. I've just simply used #vue/test-utils to mock entire computed properties using moment to get around this issue in the meantime.
You could try importing them directly in the tests. Also, I checked issues and other questions and it seems that importing timezone doesn't actually add the tz function to moment, so a way to solve it could be:
import moment from "moment-timezone"

using chutzpah and jasmine with typescript and systemjs

I am having trouble getting an import working in a jasmine unit test that is written in typescript. Chutzpah is throwing an error on the import statement - which in js gets translated to a define
import {fakeclass} from '../src/data-analysis/fakeclass';
The error I see is:
Error: ReferenceError: Can't find variable: define
Otherwise the test gets discovered and runs fine.
I assume it has to with systemjs not being loaded by chutzpah - is there a recommended way to set this up?
here is my chutzpah.json file
{
"Framework": "jasmine",
"TestHarnessReferenceMode": "Normal",
"TypeScriptModuleKind": "CommonJS",
"Compile": {
"Mode": "External",
"Extensions": [ ".ts" ],
"ExtensionsWithNoOutput": [ ".d.ts" ]
},
"References": [
{
"Includes": [ "src/*.ts" ],
"Excludes": [ "src/*.d.ts" ]
},
{
"Path": "./jspm_packages/system.src.js",
"IsTestFrameworkFile": true
},
{
"Path": "./jspm_packages/system-polyfills.src.js",
"IsTestFrameworkFile": true
},
{
"Path": "./config.js",
"IsTestFrameworkFile": true
}
],
"Tests": [
{
"Includes": [ "*/test/*.ts" ],
"Excludes": [ "*/test/*.d.ts" ]
}
]}
I took a look at the sample you gave me and got it working by following the pattern in the Chutzpah Angular2 sample.
config.js
System.config({
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
"optional": [
"es7.decorators",
"runtime"
]
},
paths: {
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
},
map: {
}
});
chutzpah.json
{
"Framework": "jasmine",
"TestHarnessReferenceMode": "AMD",
"TestHarnessLocationMode": "SettingsFileAdjacent",
"Compile": {
"Mode": "External",
"Extensions": [ ".ts" ],
"ExtensionsWithNoOutput": [ ".d.ts" ]
},
"References": [
{
"Path": "./jspm_packages/system.src.js",
"IsTestFrameworkFile": true
},
{
"Path": "./jspm_packages/system-polyfills.src.js",
"IsTestFrameworkFile": true
},
{
"Path": "./config.js",
"IsTestFrameworkFile": true
}
],
"Tests": [
{
"Includes": [ "*/test/*.ts" ],
"Excludes": [ "*/test/*.d.ts" ]
}
],
"Server": {
"Enabled": true
}
}