-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native 0.75.x #7905
Comments
any updates? |
Also encountered the same error... |
+1 |
2 similar comments
+1 |
+1 |
any update on this ? |
+1 |
Any update? |
We are waiting... i couldn't wait any longer :) |
I have fixed these issues in my project by creating patches, I will send in a PR after I do some tests. |
react-native: 0.75.3 android\gradle.properties It has only been tested for Android. FIX:1 (0.74.x and 0.75.x ) -import com.facebook.react.views.text.ReactTextShadowNode;
+import com.facebook.react.common.ReactConstants;
if ((weight == Typeface.BOLD)
- || ((oldStyle & Typeface.BOLD) != 0 && weight == ReactTextShadowNode.UNSET)) {
+ || ((oldStyle & Typeface.BOLD) != 0 && weight == ReactConstants.UNSET)) {
want |= Typeface.BOLD;
}
if ((style == Typeface.ITALIC)
- || ((oldStyle & Typeface.ITALIC) != 0 && style == ReactTextShadowNode.UNSET)) {
+ || ((oldStyle & Typeface.ITALIC) != 0 && style == ReactConstants.UNSET)) {
want |= Typeface.ITALIC;
} FIX:2 (0.75.x) package com.reactnativenavigation.utils
import com.facebook.react.views.view.ReactViewBackgroundDrawable
import com.facebook.react.views.view.ReactViewGroup
val ReactViewGroup.borderRadius: Float
get() = 0f FIX:3 (0.75.x) package com.reactnativenavigation.viewcontrollers.viewcontroller
import com.facebook.react.ReactInstanceManager
import com.facebook.react.modules.i18nmanager.I18nUtil
import com.reactnativenavigation.options.Options
import com.facebook.react.bridge.ReactContext
class LayoutDirectionApplier {
fun apply(root: ViewController<*>, options: Options, instanceManager: ReactInstanceManager) {
// currentReactContext'in null olup olmadığını kontrol ediyoruz
val reactContext = instanceManager.currentReactContext as? ReactContext
if (options.layout.direction.hasValue() && reactContext != null) {
root.activity.window.decorView.layoutDirection = options.layout.direction.get()
I18nUtil.getInstance().allowRTL(reactContext, options.layout.direction.isRtl)
I18nUtil.getInstance().forceRTL(reactContext, options.layout.direction.isRtl)
}
}
} FIX:4 (0.75.x) package com.reactnativenavigation.react.modal
import android.content.Context
import android.view.MotionEvent
import android.view.View
import com.facebook.react.bridge.*
import com.facebook.react.uimanager.*
import com.facebook.react.uimanager.events.EventDispatcher
import com.facebook.react.views.view.ReactViewGroup
class ModalContentLayout(context: Context?) : ReactViewGroup(context), RootView {
private var hasAdjustedSize = false
private var viewWidth = 0
private var viewHeight = 0
private val mJSTouchDispatcher = JSTouchDispatcher(this)
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
super.onSizeChanged(w, h, oldw, oldh)
viewWidth = w
viewHeight = h
this.updateFirstChildView()
}
private fun updateFirstChildView() {
if (this.childCount > 0) {
hasAdjustedSize = false
val viewTag = getChildAt(0).id
val reactContext: ReactContext = this.getReactContext()
reactContext.runOnNativeModulesQueueThread(object : GuardedRunnable(reactContext) {
override fun runGuarded() {
val uiManager = this@ModalContentLayout.getReactContext().getNativeModule(
UIManagerModule::class.java
) as UIManagerModule
uiManager.updateNodeSize(
viewTag,
this@ModalContentLayout.viewWidth,
this@ModalContentLayout.viewHeight
)
}
})
} else {
hasAdjustedSize = true
}
}
override fun addView(child: View?, index: Int, params: LayoutParams?) {
super.addView(child, index, params)
if (hasAdjustedSize) {
updateFirstChildView()
}
}
override fun onChildStartedNativeGesture(child: View, androidEvent: MotionEvent?) {
androidEvent?.let {
mJSTouchDispatcher.onChildStartedNativeGesture(it, this.getEventDispatcher()!!)
}
}
override fun onChildStartedNativeGesture(androidEvent: MotionEvent?) {
androidEvent?.let {
mJSTouchDispatcher.onChildStartedNativeGesture(it, this.getEventDispatcher()!!)
}
}
override fun onChildEndedNativeGesture(child: View, androidEvent: MotionEvent?) {
androidEvent?.let {
mJSTouchDispatcher.onChildEndedNativeGesture(it, this.getEventDispatcher()!!)
}
}
override fun requestDisallowInterceptTouchEvent(disallowIntercept: Boolean) {}
private fun getEventDispatcher(): EventDispatcher? {
val reactContext: ReactContext = this.getReactContext()
return reactContext.getNativeModule(UIManagerModule::class.java)?.eventDispatcher
}
override fun handleException(t: Throwable?) {
getReactContext().handleException(RuntimeException(t))
}
private fun getReactContext(): ReactContext {
return this.context as ReactContext
}
override fun onInterceptTouchEvent(event: MotionEvent?): Boolean {
event?.let {
mJSTouchDispatcher.handleTouchEvent(it, getEventDispatcher()!!)
}
return super.onInterceptTouchEvent(event)
}
override fun onTouchEvent(event: MotionEvent?): Boolean {
event?.let {
mJSTouchDispatcher.handleTouchEvent(it, getEventDispatcher()!!)
}
super.onTouchEvent(event)
return true
}
} Working!!!! |
after, i receive the error:
|
The error you're encountering, "Could not enqueue microtask because they are disabled in this runtime," is related to the Hermes JavaScript engine in React Native. This happens because Hermes does not support certain asynchronous task scheduling methods (like microtasks) that are used in some third-party libraries or parts of React Native. To resolve this issue, try the following steps: Check Hermes Compatibility: Make sure all the libraries you're using are compatible with the Hermes engine. Some libraries may rely on microtasks that Hermes doesn't support. Disable Hermes: If the library causing the issue is essential, you can try disabling Hermes to avoid the microtask limitation. In your android/app/build.gradle, set enableHermes to false: so in short "com.awesomeproject" is not related to react native navigation. android\gradle.properties newArchEnabled=false hermesEnabled=true |
@ertugruldogan : was that a chatgpt response? |
some of them yes. |
So the only way is by disabling Hermes? Or reverting the React Native version? Or disable the newArch
|
Because it's only 0.75.x the version has not been fully resolved. The react native version of the project version 0.76.x you use? {
"dependencies": {
"react": "18.3.1",
"react-native": "0.76.0-rc.1"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/cli": "15.0.0-alpha.2",
"@react-native-community/cli-platform-android": "15.0.0-alpha.2",
"@react-native-community/cli-platform-ios": "15.0.0-alpha.2",
"@react-native/babel-preset": "0.76.0-rc.1",
"@react-native/eslint-config": "0.76.0-rc.1",
"@react-native/metro-config": "0.76.0-rc.1",
"@react-native/typescript-config": "0.76.0-rc.1",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"eslint": "^8.19.0",
"jest": "^29.6.3",
"prettier": "2.8.8",
"react-test-renderer": "18.3.1",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
}
} |
Any update on this? We have a working patch in our project for this dependency, but it's kind of alarming that there has not been a release with RN 0.75 support when 0.76 is already out. |
𝘔𝘺 𝘴𝘦𝘵𝘶𝘱 𝘴𝘱𝘦𝘤𝘴𝘙𝘦𝘢𝘤𝘵 𝘯𝘢𝘵𝘪𝘷𝘦 𝘷𝘦𝘳: 0.75.3 𝘐 𝘩𝘢𝘥 𝘵𝘰 𝘢𝘥𝘥 𝘵𝘩𝘦 𝘣𝘦𝘭𝘰𝘸 𝘪𝘯 𝘨𝘳𝘢𝘥𝘭𝘦 𝘴𝘪𝘯𝘤𝘦 𝘐 𝘥𝘪𝘥𝘯'𝘵 𝘧𝘪𝘯𝘥 𝘪𝘵 𝘵𝘩𝘦𝘳𝘦: 𝘢𝘯𝘥𝘳𝘰𝘪𝘥\𝘨𝘳𝘢𝘥𝘭𝘦.𝘱𝘳𝘰𝘱𝘦𝘳𝘵𝘪𝘦𝘴 𝘛𝘩𝘦 𝘦𝘳𝘳𝘰𝘳𝘪𝘯𝘧𝘰 𝘖𝘱𝘦𝘯𝘪𝘯𝘨 𝘢𝘱𝘱 𝘰𝘯 𝘈𝘯𝘥𝘳𝘰𝘪𝘥...
𝘦: 𝘧𝘪𝘭𝘦:///𝘋:/.../.../𝘯𝘰𝘥𝘦_𝘮𝘰𝘥𝘶𝘭𝘦𝘴/𝘳𝘦𝘢𝘤𝘵-𝘯𝘢𝘵𝘪𝘷𝘦-𝘯𝘢𝘷𝘪𝘨𝘢𝘵𝘪𝘰𝘯/𝘭𝘪𝘣/𝘢𝘯𝘥𝘳𝘰𝘪𝘥/𝘢𝘱𝘱/𝘴𝘳𝘤/𝘮𝘢𝘪𝘯/𝘫𝘢𝘷𝘢/𝘤𝘰𝘮/𝘳𝘦𝘢𝘤𝘵𝘯𝘢𝘵𝘪𝘷𝘦𝘯𝘢𝘷𝘪𝘨𝘢𝘵𝘪𝘰𝘯/𝘷𝘪𝘦𝘸𝘤𝘰𝘯𝘵𝘳𝘰𝘭𝘭𝘦𝘳𝘴/𝘷𝘪𝘦𝘸𝘤𝘰𝘯𝘵𝘳𝘰𝘭𝘭𝘦𝘳/𝘓𝘢𝘺𝘰𝘶𝘵𝘋𝘪𝘳𝘦𝘤𝘵𝘪𝘰𝘯𝘈𝘱𝘱𝘭𝘪𝘦𝘳.𝘬𝘵:13:45 𝘚𝘮𝘢𝘳𝘵 𝘤𝘢𝘴𝘵 𝘵𝘰 '𝘙𝘦𝘢𝘤𝘵𝘊𝘰𝘯𝘵𝘦𝘹𝘵' 𝘪𝘴 𝘪𝘮𝘱𝘰𝘴𝘴𝘪𝘣𝘭𝘦, 𝘣𝘦𝘤𝘢𝘶𝘴𝘦 '𝘪𝘯𝘴𝘵𝘢𝘯𝘤𝘦𝘔𝘢𝘯𝘢𝘨𝘦𝘳.𝘤𝘶𝘳𝘳𝘦𝘯𝘵𝘙𝘦𝘢𝘤𝘵𝘊𝘰𝘯𝘵𝘦𝘹𝘵' 𝘪𝘴 𝘢 𝘱𝘳𝘰𝘱𝘦𝘳𝘵𝘺 𝘵𝘩𝘢𝘵 𝘩𝘢𝘴 𝘰𝘱𝘦𝘯 𝘰𝘳 𝘤𝘶𝘴𝘵𝘰𝘮 𝘨𝘦𝘵𝘵𝘦𝘳 𝘍𝘈𝘐𝘓𝘜𝘙𝘌: 𝘉𝘶𝘪𝘭𝘥 𝘧𝘢𝘪𝘭𝘦𝘥 𝘸𝘪𝘵𝘩 𝘢𝘯 𝘦𝘹𝘤𝘦𝘱𝘵𝘪𝘰𝘯.
𝘐𝘵 𝘸𝘢𝘴 𝘸𝘰𝘳𝘬𝘪𝘯𝘨 𝘸𝘦𝘭𝘭 𝘢𝘯𝘥 𝘐 𝘢𝘭𝘳𝘦𝘢𝘥𝘺 𝘤𝘰𝘮𝘱𝘪𝘭𝘦𝘥 𝘢𝘯 𝘢𝘱𝘱 𝘣𝘶𝘵 𝘸𝘩𝘦𝘯 𝘐 𝘥𝘦𝘤𝘪𝘥𝘦𝘥 𝘵𝘰 𝘪𝘯𝘴𝘵𝘢𝘭𝘭 𝘙𝘦𝘢𝘤𝘵 𝘯𝘢𝘵𝘪𝘷𝘦 𝘯𝘢𝘷𝘪𝘨𝘢𝘵𝘪𝘰𝘯 𝘮𝘰𝘥𝘶𝘭𝘦, 𝘪𝘵 𝘣𝘳𝘰𝘬𝘦 𝘵𝘩𝘦 𝘴𝘶𝘤𝘤𝘦𝘴𝘴𝘧𝘶𝘭 𝘣𝘶𝘪𝘭𝘥 𝘱𝘳𝘰𝘤𝘦𝘴𝘴 𝘢𝘯𝘥 𝘧𝘢𝘪𝘭𝘴 𝘦𝘷𝘦𝘳𝘺 𝘵𝘪𝘮𝘦 𝘯𝘰𝘸. 𝘐 𝘩𝘢𝘷𝘦 𝘵𝘳𝘪𝘦𝘥 𝘢𝘱𝘱𝘭𝘺𝘪𝘯𝘨 𝘵𝘩𝘦 𝘧𝘪𝘹𝘦𝘴 𝘪𝘯 𝘲𝘶𝘰𝘵𝘦 𝘣𝘺 @𝘦𝘳𝘵𝘶𝘨𝘳𝘶𝘭𝘥𝘰𝘨𝘢𝘯 (5 𝘍𝘪𝘹𝘦𝘴) 𝘢𝘯𝘥 𝘪𝘵 𝘴𝘵𝘪𝘭𝘭 𝘥𝘰𝘦𝘴𝘯'𝘵 𝘸𝘰𝘳𝘬. 𝘐 𝘯𝘦𝘦𝘥 𝘵𝘩𝘪𝘴 𝘸𝘰𝘳𝘬𝘪𝘯𝘨 𝘢𝘨𝘢𝘪𝘯. 𝘞𝘩𝘢𝘵 𝘤𝘰𝘶𝘭𝘥 𝘣𝘦 𝘸𝘳𝘰𝘯𝘨?? |
𝘈𝘧𝘵𝘦𝘳 𝘨𝘰𝘪𝘯𝘨 𝘵𝘩𝘳𝘰𝘶𝘨𝘩 𝘵𝘩𝘦𝘴𝘦 𝘧𝘪𝘹𝘦𝘴 𝘰𝘯𝘦 𝘮𝘰𝘳𝘦 𝘵𝘪𝘮𝘦, 𝘐 𝘯𝘰𝘵𝘪𝘤𝘦𝘥 𝘐 𝘮𝘪𝘴𝘴𝘦𝘥 𝘢 𝘧𝘦𝘸 𝘴𝘵𝘦𝘱𝘴 & 𝘮𝘪𝘴-𝘢𝘱𝘱𝘭𝘪𝘦𝘥 𝘰𝘵𝘩𝘦𝘳𝘴.
|
react-native: 0.75.0, 0.75.1, 0.75.2, 0.75.3 and 0.75.4
react-native-navigation: 7.40.1
java: 17
node: 21.1.0
gradle: 8.8
buildToolsVersion = "35.0.0"
minSdkVersion = 24 (react-native-community/discussions-and-proposals#802)
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "27.0.12077973"
kotlinVersion = "2.0.20"
Note: React Native 0.74.5 also works.
Tasks
The text was updated successfully, but these errors were encountered: