GithubHelp home page GithubHelp logo

Comments (20)

GuitarSucks avatar GuitarSucks commented on June 19, 2024

@cention-sany
If it was related to TLS connection you will have error with video or image also.
Older LINE App versions before 6.7.1 had a parameter added to the GET request of audio file. This was not proper way to request a file from client which was changed in 6.7.1 .
Can you check if your are receiving extra parameter in the GET request from client side?

from line-bot-sdk-go.

cention-sany avatar cention-sany commented on June 19, 2024

@GuitarSucks, my LINE app version (Android) is 6.8.2. From my Apache log, which has following format:
<IP> - - <Date time timezone> "<GET or POST> <URI> <HTTP version>" <Response code> <total bytes>
The URI string has the correct request URI as expected from my code (the same URI I sent to the LINE Messaging API). This URI string should includes any request parameter if there is any which there isn't any for my case. I not sure if there is any better way to check it. Do let me know how I can do better in checking it. The request do not get pass into my application and was rejected by my Apache server which acted as reverse proxy with Response code 400. As I mentioned, I did try replace the Apache server with a simple debug Golang server as below:

package main

import (
    "crypto/tls"
    "log"
    "net"
    "net/http"
    "net/http/httputil"
)

const (
    certPath   = "cert.pem"
    keyPath    = "key.pem"
    listenAddr = ":443"
)

var (
    useHTTP1 map[string]func(*http.Server, *tls.Conn,
        http.Handler) = map[string]func(*http.Server, *tls.Conn, http.Handler){}
    useHTTP2 map[string]func(*http.Server, *tls.Conn, http.Handler) = nil
)

func handler(w http.ResponseWriter, req *http.Request) {
    hdrs, err := httputil.DumpRequest(req, false)
    if err != nil {
        log.Println("Error in dump request:", err)
        log.Println("req:", req)
    } else {
        log.Print("HTTP Header data:\n", string(hdrs))
    }
    w.Header().Set("Content-Type", "text/plain")
    w.Write([]byte("This is an example server.\n"))
}

func connStateHandler(c net.Conn, cs http.ConnState) {
    log.Println("connect state:", cs.String(), "From:", c.RemoteAddr().String())
}

func main() {
    http.HandleFunc("/", handler)
    s := &http.Server{
        Addr:         listenAddr,
        ConnState:    connStateHandler,
        TLSNextProto: useHTTP1,
    }
    log.Println("About to listen to", listenAddr)
    err := s.ListenAndServeTLS(certPath, keyPath)
    log.Fatal(err)
}

The result of this Golang server log is that there isn't any log from handler func but I can see the connStateHandler of "new", "active" then "close" when I click play the sound in my LINE app. I not sure how I can get the request parameter from this Golang server because the handler func is never get trigger at all. Do let me know if any better way for me to debug this Golang server. NOTE: If I simply run command curl -s -D - <URI> -o /dev/null to this Golang server I can get "new", "active", handler log, "idle" and "close" logging.

from line-bot-sdk-go.

GuitarSucks avatar GuitarSucks commented on June 19, 2024

@cention-sany
We are checking this, but our environment is different from yours.
At this point we cant reproduce this.

from line-bot-sdk-go.

cention-sany avatar cention-sany commented on June 19, 2024

@GuitarSucks I manually contructed the link for this testing as below:
https://43.cust.cention.se/ng/line/attachment/816/307/audio.m4a
Maybe it can help for your side. This link sent into my LINE app which it will give the same error as picture below:
test

from line-bot-sdk-go.

mrmaakun avatar mrmaakun commented on June 19, 2024

Hello @cention-sany

I was able to reproduce this issue by sending an m4a audio file that is hosted on a golang server via the messaging API and then attempting to play it in the LINE Android App. I was able to play the audio file in the iOS LINE App and access it using Chrome and curl.

Our Android team will look into this issue. We will let you know if they come back with something.

Just for clarification, the file in the link in the above post that you constructed for testing is being served by a golang server, correct?

from line-bot-sdk-go.

cention-sany avatar cention-sany commented on June 19, 2024

@mrmaakun to be exact, 43.cust.cention.se has Apache acting as reverse proxy and handle the TLS portion and redirect HTTP request to a golang HTTP server.

from line-bot-sdk-go.

davisray2909 avatar davisray2909 commented on June 19, 2024

Hi @cention-sany , @GuitarSucks , and @mrmaakun
Im also having the same error using Azure server. Do you guys found any solutions yet?
Thanks in advance.

from line-bot-sdk-go.

letrungkien211 avatar letrungkien211 commented on June 19, 2024

I also have the same errors when using Azure Storage. The audio file can be played normally in Iphone, but no luck with Android?
Does Line have plan to fix this?

from line-bot-sdk-go.

davisray2909 avatar davisray2909 commented on June 19, 2024

@letrungkien211 I guess our only option is either using another Storage or wait until Line come up with better solution.

from line-bot-sdk-go.

letrungkien211 avatar letrungkien211 commented on June 19, 2024

@davisray2909 That's really sad. I faced similar issue with Video as well. Our team actually contacted Line directly last year but they basically refuse to take action. When I saw this post, I had some hope :(.
Right now we're using Apache in Linux VM as a work around, but Azure storage is just a lot better in term of simplicity and scalibility.

from line-bot-sdk-go.

cention-sany avatar cention-sany commented on June 19, 2024

@letrungkien211 I have the almost same issue with Video can not be played but only iOS LINE, Android no issue. Not sure if you facing the same problem or not.

from line-bot-sdk-go.

letrungkien211 avatar letrungkien211 commented on June 19, 2024

@davisray2909 Honestly, I don't remember exactly anymore. Maybe it was the same to me.
FYI, I tried multiple solutions:
Create Java Apache server on windows
Use Azure Storage directly
Create Azure C# webapi
Create node-js server in Windows
...
Each of the above solution only make Audio/Video work on either android or iphone. If a solution works on iphone, it doesn't on android and vice versa. I finally gave up months ago.

from line-bot-sdk-go.

davisray2909 avatar davisray2909 commented on June 19, 2024

@letrungkien211 @cention-sany Exactly the same problem.

from line-bot-sdk-go.

fataelislami avatar fataelislami commented on June 19, 2024

for the solution , i choose to upload on site google, and copy the direct link into line API
hope it help

from line-bot-sdk-go.

saurabhabh avatar saurabhabh commented on June 19, 2024

@letrungkien211 @GuitarSucks @mrmaakun Any update on this issue? I am facing the same issue on Azure server. As stated above it works fine if I upload it to the google server or a dropbox.

from line-bot-sdk-go.

tokuhirom avatar tokuhirom commented on June 19, 2024

@GuitarSucks any updates?

from line-bot-sdk-go.

GuitarSucks avatar GuitarSucks commented on June 19, 2024

We will check this issue again. Sorry for the delay

from line-bot-sdk-go.

letrungkien211 avatar letrungkien211 commented on June 19, 2024

@GuitarSucks Any update? We are going to send dynamically created videos to users at Christmas. We'd like to upload them to Azure storage for scalability. This is a blocking issue.

from line-bot-sdk-go.

letrungkien211 avatar letrungkien211 commented on June 19, 2024

Hi, FYI
I've tested and confirmed that when uploading audio (m4a) + video (mp4) to Azure blob storage, the following devices can play them

  1. Iphone 7, 8, 6s
  2. Android: Xperia XZ, Huwei P20 Lite, Xperia Z4, ASUS Zenfone3
    I am asking all our team members to test on more devices and will update this post accordingly.
    I really hope this has been completely resolved. Thanks!

from line-bot-sdk-go.

tkgauri avatar tkgauri commented on June 19, 2024

Hello,

Sorry for taking long to respond to this issue.

We have tested that audio(m4a) can be played successfully on android/iOS devices.
Devices used for testing: iPhone X, Pixel 3

Also, as per letrungkien211's comment dated Dec 1st 2018, audio can be played successfully on other android/iOS devices as well. Refer comment for device details.

For now, we are closing this issue.

If you face similar issue in future please post your question to our community website:
https://www.line-community.me/questions

Thanks!

from line-bot-sdk-go.

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.