Giter Site home page Giter Site logo

Comments (14)

velrajpaulraj avatar velrajpaulraj commented on September 26, 2024 1

Currently having the same issue

Yes facing the same issue only on release build.

from react-native-file-logger.

makalaravikiran avatar makalaravikiran commented on September 26, 2024 1

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.

ngoclamnn avatar ngoclamnn commented on September 26, 2024 1

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.

asurare avatar asurare commented on September 26, 2024

Currently having the same issue

from react-native-file-logger.

asurare avatar asurare commented on September 26, 2024

Only working using these options for now :

FileLogger.configure({ maximumNumberOfFiles: 1, dailyRolling: false, maximumFileSize: 0 })

from react-native-file-logger.

velrajpaulraj avatar velrajpaulraj commented on September 26, 2024

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.

velrajpaulraj avatar velrajpaulraj commented on September 26, 2024

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.

fdrault avatar fdrault commented on September 26, 2024

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.

fdrault avatar fdrault commented on September 26, 2024

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.

vinterstum avatar vinterstum commented on September 26, 2024

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.

vinterstum avatar vinterstum commented on September 26, 2024

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.

wzdxy avatar wzdxy commented on September 26, 2024

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๏ผš
image
image

from react-native-file-logger.

ngoclamnn avatar ngoclamnn commented on September 26, 2024

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.

fdrault avatar fdrault commented on September 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.