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

OC 9.1 Only headline showing, not tick box nor QR code #51

Closed
sorenweber opened this issue Aug 29, 2016 · 10 comments
Closed

OC 9.1 Only headline showing, not tick box nor QR code #51

sorenweber opened this issue Aug 29, 2016 · 10 comments
Labels

Comments

@sorenweber
Copy link

sorenweber commented Aug 29, 2016

Hi,

I have downloaded version 0.4.0 from appstore and unpacked in /var/www/owncloud/apps/twofactor_totp/

On my user page, I only see the headline. The language is Danish. I looked at the source of the page and I saw only this:
`

TOTP To-faktor godkendelse

`

There are no errors in the log (set to include everything).

Is it my language, or am I missing some packages?

I run

  • Ubuntu Server 14.04
  • PHP 5.5.9-1ubuntu4.19
  • ownCloud 9.1.0
@ChristophWurst
Copy link
Member

I have downloaded version 0.4.0

Please try to update to 0.4.1, which I just uploaded to the app store: https://apps.owncloud.com/content/show.php?content=174726.

On my user page, I only see the headline. The language is Danish. I looked at the source of the page and I saw only this:

Could you temporarily change the language (e.g. to English) and check again?

@sorenweber
Copy link
Author

sorenweber commented Aug 29, 2016

Sadly, updating to 0.4.1 and changing language to English did not help.

Also, when twofactor_totp is enabled the "Sessions" and "App passwords" sections do not finish loading (they show the large "loading"-circle fronzen). Disabling twofactor_totp allows me to see the sessions and app passwords lists.

@ChristophWurst
Copy link
Member

Please follow https://doc.owncloud.org/server/9.0/developer_manual/general/devenv.html#enabling-debug-mode and enable debug mode. Then try to reproduce the error and check your browser's development console. I suspect there might be js errors

@sorenweber
Copy link
Author

sorenweber commented Aug 29, 2016

I'm not used to debugging in the browser, but I enabled debug mode, opened Firefox developer tools, debugging, JS. I saw these two errors:

`TypeError: a is undefined

9191b9a7536f67469d6dab110fc85de6.js:994

9191b9a7536f67469d6dab110fc85de6.js:994
9191b9a7536f67469d6dab110fc85de6.js:994:504

TypeError: $(...).showPassword is not a function

9191b9a7536f67469d6dab110fc85de6.js:911
n.Callbacks/j()
9191b9a7536f67469d6dab110fc85de6.js:2
n.Callbacks/k.fireWith()
9191b9a7536f67469d6dab110fc85de6.js:2
.ready()
9191b9a7536f67469d6dab110fc85de6.js:2
I()
9191b9a7536f67469d6dab110fc85de6.js:2
9191b9a7536f67469d6dab110fc85de6.js:911:92
`

I can see that line 994 is: (function(e,a,o,n){'use strict';e.Settings=e.Settings||{};e.Settings.TwoFactorTotp=e.Settings.TwoFactorTotp||{};var i='<div> <input type="checkbox" class="checkbox" id="totp-enabled"> <label for="totp-enabled">'+t('twofactor_totp','Enable TOTP')+'</label></div>{{#if secret}}<div> <span>'+t('twofactor_totp','This is your new TOTP secret:')+' {{secret}}</span></div><div> <span>'+t('twofactor_totp','Scan this QR code with your TOTP app')+'<span><br> <img src="{{qr}}"> </div>{{/if}}',d=a.View.extend({template:o.compile(i),_loading:undefined,_enabled:undefined,events:{'change #totp-enabled':'_onToggleEnabled'},initialize:function(){this._load()},render:function(t){this.$el.html(this.template(t))},_load:function(){this._loading=!0;var o=e.generateUrl('/apps/twofactor_totp/settings/state'),a=n.ajax(o,{method:'GET',});var t=this;n.when(a).done(function(e){t._enabled=e.enabled;t.$('#totp-enabled').attr('checked',e.enabled)});n.when(a).always(function(){t._loading=!1})},_onToggleEnabled:function(){if(this._loading){return};var a=this.$('#totp-enabled').is(':checked');if(a!==this._enabled){this._loading=!0;var i=e.generateUrl('/apps/twofactor_totp/settings/enable'),o=n.ajax(i,{method:'POST',data:{state:a}});var t=this;n.when(o).done(function(e){t._enabled=e.enabled;t._showQr(e);t.$('#totp-enabled').attr('checked',e.enabled)});n.when(o).always(function(){t._loading=!1});this._enabled=a}},_showQr:function(t){this.render({secret:t.secret,qr:t.qr})}});e.Settings.TwoFactorTotp.View=d})(OC,Backbone,Handlebars,$);;
Is this helpful?

@ChristophWurst
Copy link
Member

Could you please post your config? Either run php occ config:list or copy the content of config/config.php (remove sensitive information).

Is this helpful?

Unfortunately no.

@ChristophWurst
Copy link
Member

Do you use the oc asset pipeline?

@sorenweber
Copy link
Author

Yes, I use the asset pipeline. I have just disabled it, and now your app is working!

I will leave it disabled. I am not sure if it is beneficial or not.

@ChristophWurst
Copy link
Member

\o/ nice!

The asset pipeline has proven to be 💩, therefore it was removed in Nextcloud. See nextcloud/server#418

@sorenweber
Copy link
Author

Thanks for you help Christoph!

As an added bonus, disabling asset pipeline suddenly made my owncloud web-interface 5-10 faster!

@ChristophWurst
Copy link
Member

As an added bonus, disabling asset pipeline suddenly made my owncloud web-interface 5-10 faster!

hehe, that's great 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants