Comments (14)
Currently having the same issue
Yes facing the same issue only on release build.
from react-native-file-logger.
Same issue for me as well
RN Version: 0.74.1
Platform: Android
Bare react native
new Arch enabled
FileLogger.configure({captureConsole:true})
from react-native-file-logger.
there is a fix in this repo tony19/logback-android#344
adding -keepclassmembers class ch.qos.logback.core.rolling.helper.* { <init>(); }
to the android/app/proguard-rules.pro helped
from react-native-file-logger.
Currently having the same issue
from react-native-file-logger.
Only working using these options for now :
FileLogger.configure({ maximumNumberOfFiles: 1, dailyRolling: false, maximumFileSize: 0 })
from react-native-file-logger.
Only working using these options for now :
FileLogger.configure({ maximumNumberOfFiles: 1, dailyRolling: false, maximumFileSize: 0 })
Thank you will try this solution
from react-native-file-logger.
Only working using these options for now :
FileLogger.configure({ maximumNumberOfFiles: 1, dailyRolling: false, maximumFileSize: 0 })Thank you will try this solution
@asurare Still facing the same issue only on release build.
from react-native-file-logger.
Hello guys, thank you for reporting this.
I don't have time right now, but I might take a look next week
Can you provide the following information to make my work easier:
- Exact react-native version
- platform (iOS/Android/both)
- Expo or Bare
- Architecture (New Architecture or Legacy)
- What your
FileLogger.configure()
looks like.
from react-native-file-logger.
I tried to reproduce your issue on an Android 14 (Pixel 6) and Android 10, in release mode, without any success.
Do you use the last version of our library, v0.5.5 ?
If not, please try to update using npm install react-native-file-logger@latest
or yarn add react-native-file-logger
.
On a pure new application, I am unable to reproduce this issue...
What device and android version are u using ?
from react-native-file-logger.
Same, after upgrade to RN 0.73.4 and a bunch of other Android SDK updates that were required for that. Crashes if either dailyRolling or maximumFileSize is passed to FileLogger.configure. Currently having to enable the logger only on iOS to work around this issue.
react-native 0.73.4
react-native-file-logger 0.5.5
buildToolsVersion = "34.0.0"
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 33
ndkVersion = "26.1.10909125"
kotlinVersion = "1.7.10"
Pixel 8 Pro (husky) running Android 14
from react-native-file-logger.
If I turned off dailyRolling: Fatal Exception: java.lang.IllegalStateException: FileNamePattern [/storage/emulated/0/Android/data/no.symi.seyfr.android.prod/cache/logs/no.symi.seyfr.android.prod-%i.log] does not contain a valid IntegerToken
Doesn't make a whole lot of sense, unless these strings are suddenly being escaped somehow.
from react-native-file-logger.
Same issue
"react-native": "0.73.2"
"react-native-file-logger": "^0.5.5"
"expo": "50.0.18"
My test device is PCT-AL10 with Android 10
The error will occur only in release mode, there is no problem in dev mode.
// my code
FileLogger.configure({
formatter: (level, msg) =>
`${dayjs().format('YYYY-MM-DD HH:mm:ss')} [${LogLevel[level]}] ${msg}`,
maximumNumberOfFiles: 30,
}).then((res) => {
console.log('FileLogger configure success', res)
})
Below are the logs collected by Sentry๏ผ
from react-native-file-logger.
getting the same issue with android release build after trying to upgrade to react-native 0.74.3, react-native-file-logger 0.5.5
FATAL EXCEPTION: mqt_native_modules
Process: uat.cxs.cscollege.learn, PID: 6646
java.lang.IllegalStateException: FileNamePattern [/storage/emulated/0/Android/data/uat.cxs.cscollege.learn/cache/logs/uat.xxx.yyy.zzz-%d{yyyy-MM-dd}.%i.log] does not contain a valid DateToken
at d5.k.start(SourceFile:1)
at d5.g.start(SourceFile:1)
at d5.l.start(SourceFile:1)
at d5.h.start(SourceFile:1)
at com.betomorrow.rnfilelogger.FileLoggerModule.configure(SourceFile:170)
from react-native-file-logger.
Thank you all for information around this issue.
@ngoclamnn nicely pointed out the exact root of the problem
The issue occurs only when Proguard is enabled, that is why it occurs only on Release mode with Proguard, but not with the basic expo/react-native-cli init project.
๐ Fix published in version 0.5.6
Please update the library:
npm install react-native-file-logger@latest
from react-native-file-logger.
Related Issues (20)
- Unable to add as a dependency to an expo managed project while using expo-dev-client HOT 6
- Unable to build Android app HOT 2
- sendLogFilesByEmail not working on iPhone HOT 3
- TimeSpan in log file is not the same as the local time HOT 1
- Change the log filename HOT 2
- FileLogger.sendLogFilesByEmail not working on iOS HOT 2
- Expo standalone build fails - MFMailComposeViewController symbol not found HOT 3
- Possible Unhandled Promise Rejection (id: 1): TypeError: Cannot read property 'configure' of null HOT 4
- Create multiple log files HOT 1
- Question about the `root.detachAndStopAllAppenders()` call HOT 8
- Question about console.log in src/index.ts HOT 1
- [Android] Specify a namespace
- Logged file contains garbage text with some strange `PARSER_ERROR` error HOT 3
- URGENT: Need to upgrade version of Cocoalumberjack to 3.8.5 to include the privacy manifest updates HOT 1
- Support for VisionOS HOT 1
- Feature request: Rollover at midnight HOT 1
- Invalid RNFileLogger.podspec, undefined method install_modules_dependencies for module Pod HOT 1
- Performance degradation detected?
- [^0.5.5] Cannot read property sendLogFilesByEmail of null on iOS HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-file-logger.