ondato / ondato-sdk-react-native

MIT License
2 stars 3 forks source link

Extracting tar content of undefined failed #2

Closed mohammadfahad112 closed 2 months ago

mohammadfahad112 commented 3 months ago

Issue

Extracting tar content of undefined failed

Details

I am encountering an issue while attempting to install the Ondato SDK React Native package using either yarn add or npm install.

Error Message

markdown Copy code

Heading

Extracting tar content of undefined failed

Details

I am encountering an issue while attempting to install the Ondato SDK React Native package using either yarn add or npm install.

Error Message

error https://github.com/ondato/ondato-sdk-react-native/releases/tag/2.4.1: Extracting tar content of undefined failed, the file appears to be corrupt: "Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?"

Steps to Reproduce

Execute the command yarn add https://github.com/ondato/ondato-sdk-react-native/releases/tag/2.4.1 or npm install https://github.com/ondato/ondato-sdk-react-native/releases/tag/2.4.1. Observe the error message mentioned above. Expected Behavior The SDK package should be successfully installed without any errors.

Additional Information I have verified the integrity of the downloaded file and it appears to be intact. This issue occurs consistently across different environments. It is recommended to investigate the root cause of the tar extraction failure to ensure smooth installation of the SDK package.

Complete Logs

yarn add v1.22.19
warning ../../package.json: No license field
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
error https://github.com/ondato/ondato-sdk-react-native/releases/tag/2.4.1: Extracting tar content of undefined failed, the file appears to be corrupt: "Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?"
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Manual Approach

Downloaded source code (tar.gz) and navigated into my react native project directory and ran npm i ondato-sdk-react-native-2.4.1.tar.gz Package got installed. Initially I faced few cocopoads related errors after resolving them. I ran pod install . It failed with this error

![image](https://github.com/ondato/ondato-sdk-react-native/assets/155013159/faf59dec-0dcf-47e6-a3a9-324e168495e1)

Error

Downloading dependencies
Installing ondato-sdk-react-native (2.4.1)
Removing CocoaAsyncSocket
Removing Flipper
Removing Flipper-Boost-iOSX
Removing Flipper-DoubleConversion
Removing Flipper-Fmt
Removing Flipper-Folly
Removing Flipper-Glog
Removing Flipper-PeerTalk
Removing FlipperKit
Removing OpenSSL-Universal
Generating Pods project
[!] Unable to install vendored xcframework `OpenSSL` for Pod `ondato-sdk-react-native`, because it contains both static and dynamic frameworks.

My Specs


    "react": "18.2.0",
    "react-native": "0.73.1",

Ruby version

ruby-2.7.3 [ x86_64 ]

error_gif

Android Build (Manual Installation)


> Configure project :react-native-reanimated
Android gradle plugin: 8.1.1
Gradle: 8.3

> Configure project :react-native-vision-camera
[VisionCamera] react-native-worklets-core not found, Frame Processors disabled!

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
5 actionable tasks: 5 up-to-date

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.kyc.ondato:sdk:2.4.1.
     Searched in the following locations:
       - https://oss.sonatype.org/content/repositories/snapshots/com/kyc/ondato/sdk/2.4.1/sdk-2.4.1.pom
       - https://repo.maven.apache.org/maven2/com/kyc/ondato/sdk/2.4.1/sdk-2.4.1.pom
       - file:/Users/dev/fiver/triangle-app/node_modules/jsc-android/dist/com/kyc/ondato/sdk/2.4.1/sdk-2.4.1.pom
       - https://dl.google.com/dl/android/maven2/com/kyc/ondato/sdk/2.4.1/sdk-2.4.1.pom
       - https://www.jitpack.io/com/kyc/ondato/sdk/2.4.1/sdk-2.4.1.pom
       - file:/Users/dev/fiver/android/local/repo/com/kyc/ondato/sdk/2.4.1/sdk-2.4.1.pom
     Required by:
         project :app > project :ondato-sdk-react-native

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 17s
info Run CLI with --verbose flag for more details.
Svaike commented 3 months ago

@mohammadfahad112 should be resolved now. Can you check if you still face the issue?

mohammadfahad112 commented 3 months ago

@Svaike I'll be implementing it today. Will definitely share outcome.

Updates yarn add https://github.com/ondato/ondato-sdk-react-native/releases/tag/2.4.1 or npm install https://github.com/ondato/ondato-sdk-react-native/releases/tag/2.4.1

Getting npm ERR! code TAR_BAD_ARCHIVE npm ERR! TAR_BAD_ARCHIVE: Unrecognized archive format

npm ERR! A complete log of this run can be found in: /Users/dev/.npm/_logs/2024-02-22T14_06_27_953Z-debug-0.log

also after trying with latest release on android i face this issue

FAILURE: Build failed with an exception.

Svaike commented 2 months ago

@mohammadfahad112 can you check the latest build? The readme was updated with new instructions as well.

Svaike commented 2 months ago

Added the example of the app to check the implementation: https://github.com/ondato/ondato-sdk-react-native/tree/main/example