Skip to content
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

io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 8192: 12596 - discarded #119

Open
malopezp91 opened this issue Oct 28, 2020 · 2 comments

Comments

@malopezp91
Copy link

Hi!

Using version 1.2.4, I am getting the following error: io.netty.handler.codec.TooLongFrameException: Adjusted frame length exceeds 8192: 12596 - discarded

Based on this question: #78, I tried to modify the maxFrameLength in the described way. However, that way is not available in version 1.2.4. I tried it the following way:

        final ServerConfiguration configuration = ServerConfiguration.newBuilder()
                .maxFrameLength(100000)
                .logSensitiveData(true)
                .build();

but I am having the same error.

Do you have any idea what could be wrong?

@MohamadSuhiebAjaj
Copy link

i also have the same problem

i try to connect my iso 8583 server
with this code


interface Iso8583ClientServiceNew {
    suspend fun sendSaleMessage(sendSaleMessageRequest: SendSaleMessageRequest)
}

class Iso8583ClientServiceNewImp : Iso8583ClientServiceNew {
    val messageFactory: J8583MessageFactory<IsoMessage> =
        J8583MessageFactory<IsoMessage>(
            ConfigParser.createDefault(),
            ISO8583Version.V1987,
            MessageOrigin.ACQUIRER
        )
    val client: Iso8583Client<IsoMessage> = Iso8583Client(
        isoMessageFactory = messageFactory,
        config = ClientConfiguration.Builder()
            .replyOnError(true)
            .maxFrameLength(16384)
            .build(),
        socketAddress = InetSocketAddress(AppConstants.ISO8583_HOST, AppConstants.ISO8583_PORT)
    )


    override suspend fun sendSaleMessage(sendSaleMessageRequest: SendSaleMessageRequest) {

        return withContext(Dispatchers.IO) {
            InternalLoggerFactory.setDefaultFactory(JdkLoggerFactory.INSTANCE)
            client.addMessageListener(AppIsoMessageListener())

            try {
                client.init()
                client.connect()

                if (!client.isConnected) {
                    throw Exception("Can't connect to the host")
                }

                client.send(sendSaleMessageRequest.isoMessage(messageFactory))

                
                Log.d("success", "Message sent successfully")
            } finally {
                client.shutdown()
            }
        }

    }

    

    inner class AppIsoMessageListener : IsoMessageListener<IsoMessage> {
        override fun applies(isoMessage: IsoMessage): Boolean {
            Log.d("message", isoMessage.debugString())
            return true;

        }

        override fun onMessage(ctx: ChannelHandlerContext, isoMessage: IsoMessage): Boolean {

            Log.d("message", isoMessage.debugString())
            val response: IsoMessage = client.isoMessageFactory.createResponse(isoMessage);

            Log.d("response", response.debugString())
            ctx.write(response)
            ctx.flush()
            return false;
        }

    }
}

and i hava io.netty.handler.codec.TooLongFrameException and AppIsoMessageListener dosn't work

i use kotlin native (jetpack compose) to development android applications

@MohamadSuhiebAjaj
Copy link

also

 Rejecting re-init on previously-failed class java.lang.Class<androidx.compose.ui.autofill.AutofillCallback>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/autofill/AutofillManager$AutofillCallback;
2024-02-19 15:59:30.553 17338-17343 art                     com.tatweer.testcompose              I  (Throwable with empty stack trace)Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.autofill.AutofillManager$AutofillCallback" on path: DexPathList[[zip file "/data/app/com.tatweer.testcompose-2/base.apk"],nativeLibraryDirectories=[/data/app/com.tatweer.testcompose-2/lib/arm64, /system/lib64, /vendor/lib64, /system/vendor/lib64]]

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

No branches or pull requests

2 participants