The app has not responded to the network requests below - android

Hi I am getting below error when I run from bitrise to do the detox testing with Android Emulator. Pasted partials codes below along with error. I tried to add --debug-synchronization with detox test command and expo helpers and hook in package json. Nothing seems to be working. Pls let me know if you need more information. Thanks
Error:
07:54:07.058 detox[4843] WARN: [PENDING_REQUESTS] The app has not responded to the network requests below:
(id = 1) currentStatus: {}
(id = -1000) isReady: {}
Unresponded network requests might result in timeout errors in Detox tests.
07:54:12.101 detox[4843] ERROR: [Client.js/ERROR] The pending request #-49642 ("cleanup") has been rejected due to the following error:
The tester has not received a response within 5000ms timeout to the message:
Cleanup {
type: 'cleanup',
params: [Object],
messageId: -49642
}
FAIL e2e/onboarding.e2e.js (329.38 s)
Onboarding
✕ should have welcome screen (1 ms)
✕ should show login screen after tap
✕ should show signup screen after tap (1 ms)
✕ should show forgot password screen after tap (1 ms)
● Onboarding › should have welcome screen
thrown: "Exceeded timeout of 120000 ms for a hook.
Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."
1 | describe('Onboarding', () => {
> 2 | beforeAll(async () => {
| ^
3 | await device.launchApp();
4 | });
5 |
at onboarding.e2e.js:2:3
at Object.<anonymous> (onboarding.e2e.js:1:1)
package.json
"detox": "^19.3.1",
"expo-detox-hook": "^1.0.10",
"detox-expo-helpers": "^0.6.0",
Bitrise.yml
format_version: '11'
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: react-native
trigger_map:
- push_branch: MBI-7610
workflow: tests
workflows:
tests:
steps:
- activate-ssh-key#4: {}
- git-clone#6: {}
- npm:
inputs:
- command: install
- npm:
inputs:
- command: install -g detox-cli
title: Install Detox CLI
- npm:
inputs:
- command: install -g react-native-cli
title: Install React Native CLI
- script:
inputs:
- is_debug: 'yes'
- content: |-
#!/bin/bash
detox build --configuration android24 --debug-synchronization 500 --cleanup
title: Detox - Build Release App (Android)
- avd-manager#1:
inputs:
- name: "$EMULATOR_NAME"
- api_level: '24'
- wait-for-android-emulator#1:
inputs:
- boot_timeout: '800'
- script:
inputs:
- is_debug: 'yes'
- content: |-
#!/bin/bash
/usr/local/share/android-sdk/emulator/emulator -list-avds
title: Print Device
- script:
inputs:
- is_debug: 'yes'
- content: |-
#!/bin/bash
detox test --configuration android24 --cleanup --debug-synchronization
title: Detox - Run E2E Tests (android)
meta:
bitrise.io:
stack: osx-xcode-13.1.x
app:
envs:
- opts:
is_expand: false
WORKDIR: "."
- opts:
is_expand: false
PROJECT_LOCATION: android
- opts:
is_expand: false
MODULE: Buddy
- opts:
is_expand: false
VARIANT: Debug
- opts:
is_expand: false
BITRISE_PROJECT_PATH: ios/Buddy.xcworkspace
- opts:
is_expand: false
BITRISE_SCHEME: Buddy-Alpha
- opts:
is_expand: false
BITRISE_DISTRIBUTION_METHOD: development
- EMULATOR_NAME: pixel_3a_API_24
outputs:
- BITRISE_APK_PATH: android/App/build/outputs/apk/alpha/debug/App-alpha-debug.apk
opts:
title: Path of the generated APK
summary: Path of the generated (and copied) APK - after filtering.
description: |-
This output will include the path of the generated APK
after filtering based on the filter inputs.
If the build generates more than one APK which fulfills the
filter inputs, this output will contain the last one's path.
.detoxrc.json
"emulator24": {
"type": "android.emulator",
"device": {
"avdName": "emulator"
}
},
"android.alpha.debug": {
"type": "android.apk",
"binaryPath": "android/App/build/outputs/apk/alpha/debug/App-alpha-debug.apk",
"build": "cd android && ./gradlew -Dorg.gradle.jvmargs=-Xmx1536m assembleAlphaDebug assembleAndroidTest -DtestBuildType=debug && cd .."
},
"android24": {
"device": "emulator24",
"app": "android.alpha.debug"
},

Related

Gitlab CI Pipeline fails because of ruby issue (Ruby installed)

I'm trying to setup CI on Gitlab. I've got a problem. Looks like runner is working well but each time I try to run pipeline it fails with following error :
Running with gitlab-runner 14.4.0 (4b9e985a)
on local-runner g_SbFiLZ
Resolving secrets
00:00
Preparing the "shell" executor
00:00
Using Shell executor...
Preparing environment
00:00
Running on GU33...
Getting source from Git repository
00:02
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in C:/Users/xxx/GitLab-Runner/builds/g_SbFiLZ/0/xxx/xxx/.git/
Checking out f4fb6ec9 as main...
git-lfs/2.11.0 (GitHub; windows amd64; go 1.14.2; git 48b28d97)
Skipping Git submodules setup
Executing "step_script" stage of the job script
00:01
$ gem install bundler
gem : The term 'gem' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the s
pelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\WINDOWS\TEMP\build_script461193448\script.ps1:225 char:1
+ gem install bundler
+ ~~~
+ CategoryInfo : ObjectNotFound: (gem:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit status 1
I have Ruby installed and setup correctly. I can run gem commands locally. Runner is also set locally so I really dont understand the issue. Here's my gitlab-ci.yml :
stages:
- prepare
- build
- test
- ui-test
variables:
LC_ALL: "en_US.UTF-8"
LANG: "en_US.UTF-8"
.setup_bundler: &setup_bundler |
gem install bundler
bundle config
bundle install
.setup: &setup
- *setup_bundler
prepare_project:
stage: prepare
script:
*setup
cache:
key:
files:
- Gemfile.lock
paths:
- vendor
artifacts:
name: "Bundle_${CI_BUILD_NAME}_${CI_COMMIT_REF_NAME}_${CI_BUILD_ID}"
expire_in: 1 day
paths:
- vendor
when: always
when: on_success
tags:
- android
build:
stage: build
script:
- bundle exec fastlane build
dependencies:
- prepare_project
tags:
- android
test:
stage: test
script:
- bundle exec fastlane tests
dependencies:
- prepare_project
tags:
- android
ui-test:
stage: ui-test
script:
- bundle exec fastlane ui_tests
dependencies:
- prepare_project
tags:
- android
Any ideas, pelase ?
It's likely that when you're running gem to debug, you're running it with a different user than gitlab-runner, which is the default gitlab-runner user. Check the PATH setup of your gitlab-runner user, and ensure that gem is on the path.

When uploading apk with the Run wzieba/Firebase-Distribution-Github-Action#v1.3.2 I get the following error

I am trying to upload an apk to firebase using github action.
I have commented out the code analysis and tests to make the action run faster so as to try and resolve the issue. I have also tried to upload an app bundle, I get the same response.
Here is the github action configuration.
name: Deploy app bundle to firebase
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout#v2
- uses: actions/setup-java#v1
with:
java-version: '12.x'
- uses: subosito/flutter-action#v1 # Setup flutter environment
with:
flutter-version: '2.5.0'
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Create env file
run: |
cat << EOF > .env
STAGING_API_BASE_URL="${{ secrets.STAGING_API_BASE_URL }}"
PROD_API_BASE_URL="${{ secrets.PROD_API_BASE_URL }}"
BASE_PATH="${{ secrets.BASE_PATH }}"
EOF
# - run: flutter format --set-exit-if-changed # - run: flutter format --set-exit-if-changed .
#- run: flutter analyze # Analyze the project's Dart code. This causes job to exit
#- name: Run flutter analyze
# run: |
# chmod +x ./flutter_analyze.sh
# ./flutter_analyze.sh
#- run: flutter test # Run Flutter unit tests for the current project.
- name: Build Gradle
run: flutter build apk --debug
- uses: actions/checkout#v2 #This uploads artifacts from your workflow
with:
name: debug-apk
path: build/app/outputs/flutter-apk/app-debug.apk
- run: ls build/app/outputs/flutter-apk
- name: Upload artifact to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action#v1.3.2
with:
appId: ${{secrets.FIREBASE_APP_ID}}
token: ${{secrets.FIREBASE_TOKEN}}
groups: testers
file: build/app/outputs/flutter-apk/app-debug.apk
When I run the workflow I get the following error:
You can use this script to find your built apk path:
run: |
echo "Find build artifacts"
apkPath=$(find app -name "*.apk" | head -1)
echo "Found apk at $apkPath"
if [[ -z ${apkPath} ]]
then
echo "No apks were found, skip publishing to App Distribution"
else
echo "Publishing $apkPath to App Center"
#publish your apk by using $apkPath
fi
it scans all agent files and finds apk file.
use
wzieba/Firebase-Distribution-Github-Action#v1.3.3
I had made a mistake on this line
- uses: actions/upload-artifact #This uploads artifacts from your workflow
The comment is correct but the action is wrong.
I should have used actions/upload-artifact https://github.com/wzieba/Firebase-Distribution-Github-Action/issues/51

github actions flutter gives error 'Artifact pattern :build/app/outputs/apk/release/*.apk did not match any files'

I created GitHub actions to run to build apk on macOS. but it gives me warning that Artifact pattern :build/app/outputs/apk/release/*.apk did not match any files.
This is a public repo, can someone please help me here. in official docs it says the same path and locally i can build apk successfully (on windows machine).
I used MacOS to generate iOs App which i'll do later.
Link of repo.
magento-mobile-oss
workflow-
name: Magento Mobile
on:
push:
branches: [ oss ]
pull_request:
branches: [ oss ]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout#v1
- uses: actions/setup-java#v1
with:
java-version: '12.x'
- uses: subosito/flutter-action#v1
with:
channel: stable
env:
KEY_JKS: ${{ secrets.KEY_JKS }}
KEY_PASSWORD: ${{ secrets.ALIAS_PASSWORD }}
ALIAS_PASSWORD: ${{ secrets.KEY_PASSWORD }}
run: echo $KEY_JKS > key.jks && flutter pub get && flutter test && flutter build apk --split-per-abi --verbose
- name: Create a Release APK
uses: ncipollo/release-action#v1
with:
artifacts: "build/app/outputs/apk/release/*.apk"
token: ${{ secrets.OSS_TOKEN }}
commit: oss
tag: v1.0.${{ github.run_number }}
Your workflow doesn't build the APK, and therefore, there's no build/app/outputs/apk/release/*.apk file. So the release action doesn't find the location of the artifacts. Here is the workflow you can use to modify yours and tweak it as you wish:
# This is a basic workflow to help you get started with Actions
name: Build Flutter APK
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "develop" branch
push:
branches: ["develop"]
tags:
- "v*"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
contents: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout#v3
- uses: actions/setup-java#v1
with:
java-version: "12.x"
- name: Setup Flutter
uses: subosito/flutter-action#v1
with:
channel: "beta"
- name: Decode android/neumodore_key.jks
run: echo "${{ secrets.KEYSTORE_JKS_PROD }}" | base64 --decode > android/keystore.jks
- name: Decode android/key.properties
run: echo "${{ secrets.KEY_PROPERTIES_PROD }}" | base64 --decode > android/key.properties
- name: Pub Get Packages
run: flutter pub get
- name: Build APK
run: flutter build apk
- name: Create Release
uses: ncipollo/release-action#v1.10.0
with:
artifacts: "build/app/outputs/apk/release/*.apk"

Flutter with AWS CloudBuild fails to compile apk

Gday!
What I'm trying to do is to create CI/CD pipeline for Flutter android application using AWS Developer tools.
But I couldn't manage to compile apk package using AWS Codebuild. Could you please help we out.
Setup is pretty simple.
enter image description here
For simplicity I took flutter HelloWorld dart code
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
#override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Welcome to Flutter',
home: Scaffold(
appBar: AppBar(
title: Text('Welcome to Flutter'),
),
body: Center(
child: Text('Hello World'),
),
),
);
}
}
buildspec.yml
version: 0.2
phases:
install:
runtime-versions:
android: 29
java: openjdk8
commands:
- pwd
pre_build:
commands:
- echo Pre Build started on `date`
- git clone https://github.com/flutter/flutter.git -b stable
- export PATH="$PATH:`pwd`/flutter/bin"
- flutter precache
- flutter doctor
build:
commands:
- echo Build started on `date`
- flutter build apk
- ls -al
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- "**/*"
CodeBuild process succeeds but each time after run it creates new random name output artifact but not .apk file.
I have tried several combinations like, but they end up with an error.
artifacts:
files:
- "**/app-release.apk"
AND
artifacts:
type: apk
files:
- "**/*"
enter image description here
Solution found. I managed to compile apk file after I changed working directory to helloworld.
Correct buildspec.yml should look like this:
version: 0.2
phases:
install:
runtime-versions:
android: 29
java: openjdk8
commands:
- pwd
pre_build:
commands:
- echo Pre Build started on `date`
- git clone https://github.com/flutter/flutter.git -b stable
- export PATH="$PATH:`pwd`/flutter/bin"
- flutter precache
- flutter doctor
build:
commands:
- cd helloworld
- pwd
- ls -al
- echo Build started on `date`
- flutter build apk
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- helloworld/build/app/outputs/flutter-apk/app-release.apk
discard-paths: yes

Error when i run sudo rake dtach:install in Rhosync

I'm following the rhosync installation guide.
$rhosync app storemanager-server
$cd storemanager-server
$sudo rake dtach:install
I get the following error:
(in /projects/sharath apps/sharatapp/storemanager-server)
rake aborted!
no such file to load -- rhosync/tasks
/projects/sharath apps/sharatapp/storemanager-server/Rakefile:5:in `require'
(See full trace by running task with --trace)
i dont know where i am going wrong
i tried writing
export RUBYOPT=rubygems
in .profile
but still it not working
when i run gem env commend
this is the following output
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /var/lib/gems/1.8
- /home/sharath/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
I install dtach as
sudo apt-get install dtach (Ubuntu)
and sloved the problem

Categories

Resources