browser icon indicating copy to clipboard operation
browser copied to clipboard

Unsupported useragent Outlook mail app for iOS

Open ZainW opened this issue 5 years ago • 4 comments

Description

Unsupported User agent request

ua: "Outlook-iOS/719.3623017.prod.iphone (4.20.0)"

This is the user agent for the outlook application on IOS

How to reproduce

browser = Browser.new('Outlook-iOS/719.3623017.prod.iphone (4.20.0)')
browser.device.name => "Unknown"
browser.platform.ios? => "true"

What do you expect

I expect that the device name gets resolved to something, ideally IPhone similar to the user agent of the mail/safari apps on iphone

What happened instead

It does not recognize this user agent even though it seems like a pretty coherent one

Software:

  • Rails version: 4.2.x
  • Browser gem version: 3.0.3

Full backtrace

irb(main):010:0> browser = Browser.new('Outlook-iOS/719.3623017.prod.iphone (4.20.0)')
=> #<Browser::Generic:0x00007fcdbb314710 @ua="Outlook-iOS/719.3623017.prod.iphone (4.20.0)", @accept_language=[]>
irb(main):011:0> browser.device.ios?
NoMethodError: undefined method `ios?' for #<Browser::Device:0x00007fcdbb2e4a38>
	from (irb):11
	from /Users/zain/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/console.rb:110:in `start'
	from /Users/zain/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/console.rb:9:in `start'
	from /Users/zain/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:68:in `console'
	from /Users/zain/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
	from /Users/zain/.rbenv/versions/2.4.6/lib/ruby/gems/2.4.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in `<top (required)>'
	from script/rails:6:in `require'
	from script/rails:6:in `<main>'
irb(main):012:0> browser.device.mobile?
=> true

Report

[Visit http://user-agent.herokuapp.com and paste the URL here] unfortunatly cannot run urls in the outlook ios app, if you know how i can definitely give it a try

this is the useragent given by rails for this user : "Outlook-iOS/719.3623017.prod.iphone (4.20.0)"

if I can provide any better information let me know

ZainW avatar Jan 22 '20 21:01 ZainW

Does this app also exist for other platforms, most notably Android? We'd need those user agents as well.

fnando avatar Jan 22 '20 21:01 fnando

I can get you an android useragent tomorrow using the outlook app as well

ZainW avatar Jan 22 '20 23:01 ZainW

@fnando i get something more traditional with the outlook for android application

ua: "Mozilla/5.0 (Linux; Android 10; Pixel 4 XL Build/QQ1B.200105.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.136 Mobile Safari/537.36"

hope that helps!

ZainW avatar Jan 23 '20 14:01 ZainW

Yeah, we can't detect it on Android devices, as it doesn't return any hints about outlook itself. I'm unsure about the right approach here. 🤔

fnando avatar Feb 25 '20 10:02 fnando