Ionic app doesn't hit on server when using capacitor - ionic4

My Ionic app works fine when running with ionic serve but when i use the command ionic capacitor run android -l it doesn't hit on sever and gives error
Webpage not available: net::ERR_CONNECTION_REFUSED
I am using the latest Ionic version.
capacitor.config.json
{
"appId": "fire.app.flashlight",
"appName": "Flashlight",
"bundledWebRuntime": false,
"windowsAndroidStudioPath": "C:\\Users\\Digisoft\\Downloads\\Compressed\\android-studio-ide-201.6692364-windows\\android-studio\\bin\\studio64.exe",
"npmClient": "npm",
"webDir": "www",
"plugins": {
"SplashScreen": {
"launchShowDuration": 0
}
},
"cordova": {},
"server": {
"url": "http://localhost:8100",
"cleartext": true
}
}

Try to erase the "url" inside the "server"

Related

Uploading app to Expo EAS and the Android and Ios builds keep failing in the preBuild phase

I have tried both android and Ios and for both the results are the same. everything is fine up until the preBuild stage. How can I correct this issue so that I can get a successful build? thanks
The images show the errors that I am getting.
Error Message
Error Message
"web": {
"favicon": "./assets/favicon.png"
},
"plugins": [
[
"expo-notifications",
{
"icon": "./local/assets/notification-icon.png",
"color": "#ffffff",
"sounds": [
"./local/assets/notification-sound.wav",
"./local/assets/notification-sound-other.wav"
]
}
]
],

Updates.channel is coming as null after setting up expo-updates

In my project I am using expo-sdk:43 along with expo-updates.
I have setup the channel property in eas.json file.
{
"cli": {
"version": ">= 0.52.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"channel":"dev"
},
"preview": {
"android": {
"buildType": "apk"
},
"channel":"preview"
},
"production": {}
},
"submit": {
"production": {}
}
}
I have tried to publish my updates through EAS update, but it is not working and the app is not receiving any update. I have tried to do an apk build for the application, and tried to get the output of Updates.Channel and it is outputting as undefined.
eas build -p android --profile --preview
eas update --branch preview --message "update"
But, when I build the app, the build is successful, in the eas logs I can see that it shows that channel property has also been configured.
Can someone please help what might be the possible issue in this case?
I have also tried to do the same steps with an expo-init command (But with expo sdk:47) and minimal app setup and it is working as expected.

Can't Open My App in Production | DeepLink React Native | React Navigation v5/v6

hope you guys have a great day!
I'm in the middle of learning deeplink in react native, currently I've managed to open my app via cmd using npx uri-scheme open myapp://inv/12321312 --android, and the page I'm going to is also already open along with the :id I included in the link
now i have released my app (not yet uploaded in playstore - but just run npx react-native run-android --variant=release), then why when i access myapp://inv/12321312 link in my browser, my app doesn't open?
i'm using Google Chrome in my android device
please help:(
in app.json add intentFilters for android
if you are using expo
{
"expo": {
"scheme": "myapp",
.....
"android": {
...
"intentFilters": [
{
"action": "VIEW",
"autoVerify": true,
"data": [
{
"scheme": "https",
"host": "myapp.com",
"pathPrefix": "/"
},
{
"scheme": "myapp",
"host": "*",
"pathPrefix": "/"
}
],
"category": [
"BROWSABLE",
"DEFAULT"
]
}
]
...
},
}
}
or if you are using react native CLI
https://developer.android.com/training/app-links/deep-linking#adding-filters
after that generate APK for Android
and send https://myapp.com/ in message whatsapp
click this link from chat
it's work ^^
update : (test)
ios => after build ipa for test ios run this link in your browser phone when app installed : myapp://
android => after build apk for test android send in this link in message (email , whatsapp, ...) and click link for test (after installed app)

Browserify-shim not reading a transform from the package.json

I am trying to use browserify to build a new project that my team is working on, but it does not recognize the transform from the package.json. It will build on 2 machines, but on 2 others it will not build.
Here is the relevant piece of my package.json.
"dependencies": {},
"devDependencies": {
....
},
"browserify": {
"transform": [
"browserify-shim"
]
},
"browser": {
"angular": "./src/main/webapp/js/lib/angular.js",
"angular-route": "./src/main/webapp/js/lib/angular-route.js",
"underscore": "./src/main/webapp/js/lib/lodash.compat.js",
"restangular": "./src/main/webapp/js/lib/restangular.js"
},
"browserify-shim": {
"angular": {},
"angular-route": {
"depends": [
"angular"
]
},
"underscore": {
"exports": "_"
},
"restangular": {
"depends": [
"underscore",
"angular"
]
}
}
I am running browserify from the command line. I have 4 computers on my team and it is working on a Mac and a Windows machine, but I have 2 Windows machine that it does not work on. We have all pulled from the same repo, all of our browserify and npm versions are the same. What should I do next?
The Windows machines were running the command from git bash. The command would not work with on git bash. After we switched to the command prompt, then all of the commands run fine.

composer to disable https completely

my network does not work well with https, so doing
composer.phar install
throws
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: Failed to enable crypto
failed to open stream: operation failed
i used
{
"packagist": false
},
{
"type": "composer",
"url": "http://packagist.org",
"options": {
"ssl": {
"verify_peer": "false"
}
}
}
as a http falback, but again it crashes in some other point:
Installing dependencies
- Installing symfony/translation (v2.4.0)
Downloading: 100%
Downloading: 100%
Downloading: 100%
[Composer\Downloader\TransportException]
The "https://api.github.com/repos/symfony/Translation/zipball/0919e0fc709217f8c9e5049f2603419fdd4a34ff" file could not be downloaded: Failed to
enable crypto
failed to open stream: operation failed
my problem is just with TLSv1, previous SSL versions should work, as the browsers work correctly.
how should i do, the problem also exists in other cmd tools that depend on https like npm, bower, git, curl, ...
composer config --global disable-tls true
composer config --global secure-http false
You can turn off TLS (For your specific project) using your composer.json as such:
{
"require": {
"laravel/framework": "5.2.43"
},
"config": {
"preferred-install": "dist",
"disable-tls": true,
"secure-http": false
}
}
NB: Take not of the "disable-tls": true in the config section.
The problem is simply that you wrapped "false" in quotes, which is true when converted to bool.
Use "verify_peer": false instead of "verify_peer": "false":
{
"repositories": [
{
"type": "composer",
"url": "http://packagist.org",
"options": {
"ssl": {
"verify_peer": false
}
}
}
]
}
It's okey.
It will work. You just have a mismatch:
"options": {
"ssl": {
"verify_peer": false
}
}
in order to disable https totaly (not recommanded)
you need to add "secure-http": false in your composer.json file config key like this:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "5.3.*",
},
...
"config": {
"preferred-install": "dist",
"bin-dir": "vendor/bin/",
"secure-http": false
},
"minimum-stability": "dev"
}
You cannot disable SSL with Composer. Even if it works like in your setup, you cannot control the source URLs of any package you use. Some of them do not offer anything without SSL, so you MUST use SSL.
I think it's the best idea to make SSL work. Did you try composer diag and see where the problem is?