Giter Club home page Giter Club logo

branch_io's People

Contributors

dchill42 avatar jdee avatar knightstick avatar ushu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

branch_io's Issues

Occasional Branch error on deep link creation

I don't have a good grasp on what is happening, but occasionally my Rails new user signup flow breaks on what appears to be a branch_io error. Here's the error I am receiving. Note I am using the omniauth-google-oauth2 gem:

2020-06-15T12:25:32.979236+00:00 heroku[router]: at=info method=POST path="/auth/google/callback" host=XYZ.herokuapp.com request_id=34a5f001-cc1d-4e61-8663-621ca7784dc7 fwd="209.6.42.243" dyno=web.1 connect=0ms service=1660ms status=204 bytes=487 protocol=https
2020-06-15T12:25:32.949836+00:00 app[web.1]: W, [2020-06-15T12:25:32.949696 #26]  WARN -- : [34a5f001-cc1d-4e61-8663-621ca7784dc7] Exception undefined method `errors' for #<BranchIO::Client::ErrorResponse:0x0000000641afb8>
2020-06-15T12:25:32.949878+00:00 app[web.1]: Did you mean?  error
2020-06-15T12:25:32.974823+00:00 app[web.1]: I, [2020-06-15T12:25:32.974652 #26]  INFO -- : [34a5f001-cc1d-4e61-8663-621ca7784dc7] No template found for ApplicationController#omniauth_callback, rendering head :no_content
2020-06-15T12:25:32.975322+00:00 app[web.1]: I, [2020-06-15T12:25:32.975229 #26]  INFO -- : [34a5f001-cc1d-4e61-8663-621ca7784dc7] Completed 204 No Content in 1357ms

Here's my branch_io related Ruby code:

after_create do |user|
    follow_users_from_default_user!()
    client = BranchIO::Client.new(Rails.application.config.branch_key, Rails.application.config.branch_secret)
    url_configs = [
        {
          channel: "#{username}",
          campaign: "Author",
          data: {
            '$og_type': "article", 
            '$og_image_url': "XYZ",
            '$og_title': "XYZ",
            '$og_description': "XYZ",
            '$fallback_url': "https://XYZ.com/u/#{username}",
            '$canonical_url': "https://XYZ.com/u/#{username}",
            author_id: "#{id}"
          }
        },
        { 
          channel: "#{username}",
          campaign: "Author",
          data: {
            '$og_type': "article", 
            '$og_image_url': "http://www.XYZ.com/media/social.png",
            '$og_title': "XYZ",
            '$og_description': "XYZ",
            '$canonical_url': "https://XYZ.com/u/#{username}",
            author_id: "#{id}"
          }
        } 
      ]

      res = client.links(url_configs)

      if res.success?
        set author_deep_link: res.urls[0]
        set author_deep_link_app_store: res.urls[1]
        logger.info "Successfully created #{res.urls[0]} and #{res.urls[1]}"
      else
        logger.error "Error creating URLs: #{res.errors.join(',')}"
        # There has been errors, but some URLs might be valid
        if res.urls.count > 0
            logger.error "Successfully created #{res.urls.count} URLs out of #{url_configs.count}: #{res.urls.join(',')}"
        end
      end
  end

Can you see what could be going on? I'm probably not handling potential errors correctly (as it breaks my entire signup flow when this happens), but any help you can provide would be greatly appreciated. Note I am using the 0.2.0 version of branch_io - Please let me know if I can get you any further info or debug. Thanks!

Link auto clicking

I am facing very strange issue with $desktop_url. as I have created deep link with $desktop_url, and send that link via email.
but link is auto calling on server without clicking on it.

here is my code

client = BranchIO::Client.new(ENV['BRANCH_KEY'], ENV['BRANCH_SECRET'])
    res = client.link(
        feature: 'confirmation_link',
        data: {
          token: token,
          "$desktop_url": "#{ENV['DOMAIN_URL']}/api/v1/users/confirmation.html?confirmation_token=#{token}"
        })
    res.url

If I removed $desktop_url then all things work like charm.

Thanks in advance.

Custom deeplink

Hi, @ushu
I have a question about this gem.
I am developing an application that I have to create a deeplink for a product dynamically, to be opened in the browser on the pc or in the app (Android or iOS), but I could not use the date field to direct the urls to the mobiles, always the web page Is directed to the home the same happens in the mobile. But deeplinks work when I create on dashboard branch.io or when I create it dynamically on the mobile.
I would like to know if this functionality is implemented or if I am doing it wrong?

I used:
#...
res = client.link(
feature: "test",
date: {
$desktop_url => "mywebsite.com/product/id",
    $android_url => "myapp: // product / id",
    $ios_url => "myapp: // product / d"
  }
)

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.