Categories
Mastering Development

token not send to the server in angular WWW-Authenticate: Bearer and get 401 error

I’m new in angular and I’ve created a small role-based app using Angular 9 for frontend and Asp.net core. when I log in/logout to the app is working correctly without any issue and I can access the non-Authorize controllers from frontend but when I want to access an Authorize controller ( "company" ) I get […]

Categories
Mastering Development

“Unique constrainted failed” problem when running migrations

I have been tryed to change a django model by applying and running migrations but I have been getting this error django.db.utils.IntegrityError: UNIQUE constraint failed: new__startup_home_mates.user_id How can this error be fixed? I have already investigated a lot but I have found nothing that fits my situation. I have already tried to use RenameField and […]

Categories
Mastering Development

Guzzle error “Call to a member function getStatusCode() on null” when curl and Postman are perfectly fine

I’m setting up Guzzle as my Laravel 6’s HTTP Client in my project. It was perfectly working and giving responses on every API hit. But suddenly it returns "Call to a member function getStatusCode() on null" error. I’ve tried using Postman and curl to hit the API, and they return the right response when Guzzle […]

Categories
Cryptocurrency Ethereum Mastering Development

MetaMask custom RPC connection error with private ganache-cli, EC2

Currently I am trying to build private dapp using ganache-cli as a blockchain backend with aws ec2 instance. I get the expected result from terminal. request: curl -X POST –data ‘{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":67}’ localhost:8545 response: {"id":67,"jsonrpc":"2.0","result":"EthereumJS TestRPC/v2.10.2/ethereum-js"} However, I get following error when I set up MetaMask’s custom rpc like: {MY_PUBLIC_IP}:8545 even though my ganache docker (and […]

Categories
Mastering Development

While trying to edit, system throws Cannot read property ‘0’ of null

While trying to edit any of text fields throws error Cannot read property ‘0’ of null and the image also not updating to the database. Added a screen shot TypeError: Cannot read property ‘0’ of null handleChange C:/Project/soccerpep/src/components/Profile.js:67 import React, {useEffect, useState } from "react"; import { useForm } from ‘react-hook-form’; import { useHistory } […]

Categories
Mastering Development

Actions on Google Oauth Account Linking using auth0

I am trying account linking for my actions on google using oauth. For the authorization and token url I used auth0 . I am using the Sign in event in my default welcome event but am encountered with an error and it doesn’t take me to the sign in page. I get the following error […]

Categories
Mastering Development

Using Node.js to generate dynamic word document using Database value

I am trying to dynamically populate the WORD Document using npm docx. I am trying to read the data from the SQLite database but due to async node js property the values are not getting into the variable and it shows undefined. If I make the function synchronous the npm docx throws error and doesn’t […]

Categories
Cryptocurrency Ethereum Mastering Development

MetaMask – RPC Error: Error: [ethjs-rpc] rpc error with payload [obejct Object

I am trying to sign transactions using certify_send() function to a smart contract deployed to my private ethereum blockchain but I keep getting this error after I approve in MetaMask MetaMask – RPC Error: Error: [ethjs-rpc] rpc error with payload { “id”: 6657017249622, “jsonrpc”: “2.0”, “params”: [“<a long hex string>”], “method”: “eth_sendRawTransaction” } [object Object] […]

Categories
Cryptocurrency Ethereum Mastering Development

How to debug a “rpc error with payload”

Debugging smart contract errors can be surprisingly hard. There is one particular kind of error that annoys me the most: the infamous rpc error with payload. For instance, just a few hours ago, while deploying a smart contract from the front-end using new web3.eth.Contract().deploy() into ganache-cli, I got the following in the browser’s console: MetaMask […]

Categories
Mastering Development

eslint-plugin-react-hooks is giving unexpected errors (react-hooks/exhaustive-deps)

I have an issue where my vscode eslint is giving me wrong warnings. I have a simple function in react component which I am trying to optimize with useCallBack hook. Here is the simple function where I am getting two props and there are being used in params object I create and as per the […]