Skip to content

Conversation

@KDederichs
Copy link

Fix double include of CocoaAsyncSocket in RN 0.62 since it's there by default now.

Same fix as react-native-udp
@chrmod
Copy link

chrmod commented Apr 27, 2020

Can we please get it merged and released?

@KDederichs
Copy link
Author

While you wait I suggest just removing those via
https://github.com/ds300/patch-package#readme
@chrmod
It at least helps moving forward (at least that's what I did while I wait for it to merge)

@chrmod
Copy link

chrmod commented Apr 27, 2020

@KDederichs thanks for the suggestion. Will this work in this case? The root of the proplem is cocoapod not nodejs package. Have you published your fix maybe? I'm eager to use it a POC I'm working on.

@KDederichs
Copy link
Author

@chrmod Yes it does work since the Pod code is shipped in the node package.
Here's a gist with my patch file, since like I said I'm just using patch-package since I have it set up for other libraries that stubbornly refuse to fix their stuff.

https://gist.github.com/KDederichs/5ba8ff22b12f4433a4ce5e0ce63b98d0

It's basically this pull request as file.

@chrmod
Copy link

chrmod commented Apr 28, 2020

@KDederichs this works great. Thank you!

@ArshanKhanifar
Copy link

What's the status on this? When is it going to get merged? 😇 I'm using patch-package but would like not to do so.

@compojoom
Copy link

@KDederichs - thanks for this pull request. I just wanted to create the same as I was integrating flipper on iOS and ran into that problem.

@aprock can we get this merged please?

In the meantime as @KDederichs suggested you can use patch-package to remove CocoaAsyncSocket

@aprock aprock merged commit ec3841f into aprock:master Jun 15, 2020
@aprock
Copy link
Owner

aprock commented Jun 15, 2020

merged

@compojoom
Copy link

A new release would be also very cool :)

@roaringUnicorn
Copy link

I'd love a release too !

@ReactNativeDev2296
Copy link

ReactNativeDev2296 commented Jul 23, 2021

we are facing crash issue when get permission of local network and get error tcp socket is not connected @phillbaker @aprock please help,
crashing log
`*** First throw call stack:

(0x1a154f25c 0x1b52e4480 0x1027128dc 0x10278f150 0x10278fb88 0x1a1553a10 0x1a1435720 0x1a1435c84 0x1027429b0 0x102744b44 0x1027448a8 0x104333ae8 0x10433532c 0x10433c38c 0x10433d010 0x104348820 0x1e9b595bc 0x1e9b5c86c)

libc++abi: terminating with uncaught exception of type NSException

*** Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: Error: Socket is not connected.', reason: 'Unhandled JS Exception: Error: Socket is not connected., stack:

@1320:4943

w@1331:1755

b@1331:1629

@1331:3542

@1171:9295

y@129:580

callTimers@129:2629

value@25:3350

@25:747

value@25:2610

value@25:719

value@(null):(null)

'

terminating with uncaught exception of type NSException`
React native version:-0.63.1,
IOS version:14.7,
RN-tcp:-4.0.0

github-merge-queue bot pushed a commit to MetaMask/metamask-mobile that referenced this pull request Dec 20, 2024
## **Description**

Quality Quest 2024 ft. @naugtur and @tommasini b2b

TODO
- [x] add package
- [x] integrate in CI
- [x] update depcheck
- [x] socket

## **Related issues**

- Fixes: https://github.com/MetaMask/mobile-planning/issues/2079

## **Manual testing steps**

1. Locally update package.json to `"react-native-tcp":
"aprock/react-native-tcp#11/head"`
2. Run `yarn git-safe-dependencies`
3. There should be an error message
4. Revert package.json to the correct `"react-native-tcp":
"aprock/react-native-tcp#98fbc801f0586297f16730b2f4c75eef15dfabcd",`
5. Run `yarn git-safe-dependencies`
6. great
7. success

## **Screenshots/Recordings**

### **Before**

e.g. package.json > `"react-native-tcp":
"aprock/react-native-tcp#11/head",`


![image](https://github.com/user-attachments/assets/f054cda3-ce19-4b64-a84d-e1f92397d2be)

### **After**

fixed to: package.json > `"react-native-tcp":
"aprock/react-native-tcp#98fbc801f0586297f16730b2f4c75eef15dfabcd",`
in #12595


![image](https://github.com/user-attachments/assets/a3340650-743f-48f8-a4bc-b1dcfd81d243)

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants