Proxy not created in Angular 14 - json

{
"/family-book-base/*": {
"target": "http://localhost:8080",
"secure": false,
"logLevel": "debug"
}
}
When I start my angular application using ng serve --proxy-config proxy.conf.json, it starts properly, but the proxy path is not created.
Note:
Using the same proxy file with Angular 11 it's working fine.

Related

Proxy.config.json invalidSymbol [1,1]

I am trying to add proxy to change the origin to the server
like
from http://localhost:4200/api/deaprtment/get/2
to http://localhost:7201/api/department/get/2
note that localhost:4200 is what my angular app run in
and localhost:7201 is what my asp.net server run in
my proxy-config.json is
{
"/api": {
"target": "http://localhost:7201",
"secure": false
}
}
it's in src/proxy-config.json
my angular.json is
.
.
.
"serve": {
"builder": "#angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "test2:build:production"
},
"development": {
"browserTarget": "test2:build:development",
"proxyConfig": "src/proxy-config.json"
}
},
"defaultConfiguration": "development"
},
.
.
.
and when run ng serve
it's always give me that error:
Generating browser application bundles (phase: setup)...An unhandled exception occurred: Proxy configuration file
C:\Users\nasse\RiderProjects\Solution2\test2\src\proxy-c onfig.json
contains parse errors: [1, 1] InvalidSymbol See
"C:\Users\nasse\AppData\Local\Temp\ng-T9wrQt\angular-errors.log" for
further details.
Just had the same error, when updating to angular 14. Change the encoding of the proxy.config.json file from UTF-8-BOM to UTF-8 worked for me.

Firebase Local Emulator Suite does not find the 'database.rules.json' file when started from CLI

The firebase.json file:
{
"emulators":
{
"auth": {
"port": 9099
},
"database": {
"port": 9000,
"rules": "database.rules.json",
"target": "default"
},
"ui": {
"enabled": true
}
}
}
There is a database.rules.json file that sits next to the firebase.json file, containing the json rules which work correctly on the live database.
The files created automatically by the command:
firebase init emulators
all are in the project root directory. I copied the rules from the live project, and created the database.rules.json file right next to the other files, like so:
ROOT
|
|.firebaserc
|firebase.json
|database.rules.json
However, the CLI command:
$ firebase emulators:start
returns the following error:
⚠ database: Did not find a Realtime Database rules file specified in a firebase.json config file.
The emulator runs all right, but the rules are not taken into account.
Why is the 'database.rules.json' NOT found by the emulator? Is this a path issue?
The reason it did not work as expected was because a local database should have been initiated, but was not.
To initiate a local database, the following command should be used:
firebase init database
As I had an existing database (created by the Realtime Console) which I had linked with my local project when using the interactive command:
firebase init emulators
I thought I could then start the simulator and test away. Not so.
Failing to initiate a database with a CLI command seems to trigger the CLI response:
⚠ database: Did not find a Realtime Database rules file specified in a firebase.json config file
When what is really meant is:
Duh, there is no local database. You must create a local database first, even if you link this project to an existing remote
try something like this
firebase.json
{
"functions": {
"source": "functions"
},
"firestore": {
"rules": "./firestore.rules"
},
"database": {
"rules": "./database.rules.json"
},
"emulators": {
"auth": {
"port": 9099
},
"functions": {
"port": 5001
},
"firestore": {
"port": 8080
},
"database": {
"port": 9000
},
"hosting": {
"port": 5000
},
"pubsub": {
"port": 8085
},
"storage": {
"port": 9199
},
"ui": {
"enabled": true
}
}
}

Angular6 ServiceWorker dont cache all files

I generated a clean Angular6 Project and use ng add #angular/pwa i get this ngsw-config.json:
{
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/*.css",
"/*.js"
]
}
},
{
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**"
]
}
}
]
}
There is the whole assets folder marked for "Service Worker Caching" But the Sad reality show that this isnt real:
The 3 Graphic files i use ( header-bg.jpg, list-border-red.svg & list-border-green.svg ) Are marked as "from ServiceWorker" But when i create a App on my Smartphone, and disconnect the Internet connection and open the App, is only header-bg.jpg available. but list-border-red.svg & list-border-green.svg are not available offline.
Also shows the graphic thas 2 favicons are loaded from "Disc Cache" and one from the ftp... The files are also in the assets folder, why they are not cached fro mServiceWorker? Is the ServiceWorker stuff maybe bugged in Chrome?
The App is allready Online and can be found here: https://expense-calculator.com/ Just open and make your own tests if you need this to reproduce my problem.
Your service worker code looks good and is registered perfectly to serve the files in offline just as you have expected it to work. I've checked in Chrome with Airplane mode on. All files including .svg files loaded from cache.
Please retry.

Nightwatch with Chrome on Windows: Currently Unusable?

Since my chrome update, I cannot make any nightwatch tests work on Windows 10.
At first the system simply couldn't set values. So I updated to the latest nightwatch, then updated to latest chromedriver.exe and latest selenium jar.
Now the test simply shows data: in the url of the driven browser instead of loading the page. There is also a "disable developer mode extensions" popup and a warning that "--ignore-certificate-errors" is no longer supported.
Any ideas what I'm supposed to have done?
Chromedriver.exe version: 2.38
Selenium Standalone Server: selenium-server-standalone-3.9.1.jar
Nightwatch version: nightwatch#0.9.21
Thanks for any help. Here's my config:
{
"src_folders": ["tests"],
"output_folder": "reports",
"custom_commands_path": "",
"custom_assertions_path": "",
"page_objects_path": "pages",
"globals_path": "globals",
"selenium": {
"start_process": true,
"server_path": "./lib/selenium-server-standalone-3.9.1.jar",
"log_path": "./reports",
"host": "127.0.0.1",
"port": 4444,
"cli_args": {
"webdriver.chrome.driver": "./lib/chromedriver.exe"
}
},
"test_settings": {
"default": {
"launch_url": "https://modaquote.com",
"selenium_port": 4444,
"selenium_host": "localhost",
"silent": true,
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true
}
}
}
}
You have to update Chromedriver to match your new version of Chrome. It should fix there issues.

.Net core console app: The dependency MySQL.Data.Core >= 7.0.4-IR-191 could not be resolved

I've created a test .Net core console application with Visual studio 2015.
A simple console app that communicates with a MySQL db. In debug mode the app runs fine.
When I'm deploying it to Ubuntu (version 16.04) and try to run, I'm receiving the next error:
.net core deploy on Ubuntu -> error NU1001: The dependency MySql.Data.Core >= 7.0.4-IR-191 could not be resolved
I did a dotnet restore and no problems when restoring the packages, only when I'm executing the dotnet run the problem is produced!
Any help, perhaps the package MySql.Data.Core is not Linux compliant?
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true,
"copyToOutput": {
"include": "appsettings.json"
}
},
"dependencies": {
"Microsoft.EntityFrameworkCore": "1.0.1",
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
},
"MySql.Data.Core": "7.0.4-IR-191",
"MySql.Data.EntityFrameworkCore": "7.0.4-IR-191"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dnxcore50",
"portable-net452+win81"
]
}
}
}`