Categories
Development

Can i have 2 filekey attribute in a FileUploadOptions parameter IONIC3?

I want to upload 2 image file on the server, but unable to upload 2 image file in a same api. In JSON api there is 2 parameter which requires image file i.e id_proof_file_name and address_proof_name. Rest Api function register(imageidproof,imageaddproof, fullname, mobile_no, dob, address, nominee_name, id_proof_number, add_proof_number): Promise<any> { return new Promise((resolve, reject) => { […]

Categories
Angular Development Google

OAuth2 with Google – CORS Error (Angular + Spring boot)

I have problem with CORS error. I do request for Google oAuth2 and i get a CORS ERROR: I want to get google authentication and generate a JWT token. When I do it without using the client everything is fine. When I send angular requests this is a problem with CORS. I allow all types […]

Categories
Chrome Development Drivers

Setup selenium with headless chrome error: WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally

I am trying to get selenium running with a headless chrome in the following environment: OS: Ubuntu 16.04.6 Chrome: 77.0.3865.90 (Official Build) (64-bit) ChromeDriver: 77.0.3865.40 Selenium server version: 3.141.59, revision: e82be7d358 I’ve been reading about it at developer.google.com and followed the recommended Running Selenium with Headless Chrome post. I followed the steps in the ipython […]

Categories
Development Plugins

gatsby-plugin-layout still mounting layout on each page load

I have installed gatsby-plugin-layout into my project files, created src/layouts/index.js, and added gatsby-plugin-layout to gatsby-config.js. The Gatsby app compiles and can be served on the development server, but via console.log outputs in componentDidMount() of my Layout component, I see that the layout component still is re-mounted on each page load. My goal is to have […]

Categories
Development

YouTube api returns 404 liveBroadcastNotFound for existing liveBroadcast on status transition from “live” to “complete”

I’m using Node.js as a backend technology and googleapis library as a tool for simple YouTube-api integration. const { google: { auth: { OAuth2 }, youtube, }, } = GoogleApis; const oauth2Client = new OAuth2(tokenId, secretKey, redirectUrl); const youTube = youtube({ version: ‘v3’, auth: oauth2Client }); Flow: 1) liveBroadcast creation. youTube.liveBroadcasts.insert({ part: ‘id,snippet,status,contentDetails’, requestBody: { […]

Categories
Development

How to register hapi cron with the latest version of hapi.js

I have my server registered with hapijs. Here is my index.js composer((err, server) => { if (err) throw err server.initialize((errInit) => { if (err) throw errInit const register = (hapiRaven, options, next) => { return next() } register.attributes = { name: ‘hapi-raven’, version: ‘1.0.1’, options: { } } server.register([ register ]) server.start(() => { // […]

Categories
Development

Create several indices definitions / theorems at end of bookdown book

This code example to generate a list of definitions works for me but only for one index list. Whenever I try to add another list (e.g. for theorems) only the one defined last in the setup junk works. Probably I haven’t adapted knit_hooks$set() correctly: — title: “Create several lists” output: bookdown::html_document2 — “`{r setup, include=FALSE} […]

Categories
ASP.NET Development MVC

CORS in ASP.Net MVC with SignalR causes “Access-Control-Allow-Origin” error

I use SignalR (v2.4.0) in an ASP.NET MVC project with Angular 8 and encounter “Access to XMLHttpRequest at ‘https:/demo.com/signalr/negotiate?clientProtocol=2.1&connectionData=’ from origin ‘http://localhost:20700‘ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.” error while debugging (also similar error in PROD stage). I have tried to apply fixes on Setting Access-Control-Allow-Origin […]

Categories
Bootstrap Development

issue in Bootstrap 4 validation on select field

I’m new to jQuery and Bootstrap, I’m using jquery and Bootstrap 4 for validation of my form modal, whenever there is an error it must show the error below the corresponding fields, but in my case the select field gets overwritten by the error and select field disappears but it works fine for input field. […]

Categories
Angular Chrome Development

CORS Chrome wildcard ‘*’ Angular 8?

I get the following message CORS only in Chrome, Mozilla works fine: Access to XMLHttpRequest at ‘http://localhost:8002/dataHub/negotiate‘ from origin ‘http://172.16.30.79:4200‘ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode […]