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

Cannot abandon claim from claim page #833

Closed
tzarebczan opened this Issue Dec 9, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@tzarebczan
Member

tzarebczan commented Dec 9, 2017

The Issue

When removing a file via the claim page / choosing the abandon uri option, the file is deleted but not abandon because of a console error. The claim has to be abandoned manually then.

Uncaught TypeError: Cannot read property 'claim_id' of undefined
    at file:///C:/Users/thoma/AppData/Local/Programs/LBRY/resources/app.asar/renderer.js:5:8155
    at C:\Users\thoma\AppData\Local\Programs\LBRY\resources\app.asar\node_modules\redux-thunk\lib\index.js:11:18
    at dispatch (C:\Users\thoma\AppData\Local\Programs\LBRY\resources\app.asar\node_modules\redux\lib\applyMiddleware.js:45:18)
    at file:///C:/Users/thoma/AppData/Local/Programs/LBRY/resources/app.asar/renderer.js:5:64785
    at file:///C:/Users/thoma/AppData/Local/Programs/LBRY/resources/app.asar/renderer.js:18:22502
    at Array.map (native)
    at file:///C:/Users/thoma/AppData/Local/Programs/LBRY/resources/app.asar/renderer.js:18:22479
    at C:\Users\thoma\AppData\Local\Programs\LBRY\resources\app.asar\node_modules\redux-thunk\lib\index.js:14:16
    at dispatch (C:\Users\thoma\AppData\Local\Programs\LBRY\resources\app.asar\node_modules\redux\lib\applyMiddleware.js:45:18)
    at file:///C:/Users/thoma/AppData/Local/Programs/LBRY/resources/app.asar/renderer.js:5:65622
    at C:\Users\thoma\AppData\Local\Programs\LBRY\resources\app.asar\node_modules\redux-thunk\lib\index.js:11:18
    at deleteFile (file:///C:/Users/thoma/AppData/Local/Programs/LBRY/resources/app.asar/renderer.js:18:507555)
    at onConfirmed (file:///C:/Users/thoma/AppData/Local/Programs/LBRY/resources/app.asar/renderer.js:18:509344)
    at HTMLUnknownElement.boundFunc (C:\Users\thoma\AppData\Local\Programs\LBRY\resources\app.asar\node_modules\react-dom\lib\ReactErrorUtils.js:63:9)
    at Object.ReactErrorUtils.invokeGuardedCallback (C:\Users\thoma\AppData\Local\Programs\LBRY\resources\app.asar\node_modules\react-dom\lib\ReactErrorUtils.js:69:16)
    at executeDispatch (C:\Users\thoma\AppData\Local\Programs\LBRY\resources\app.asar\node_modules\react-dom\lib\EventPluginUtils.js:83:21)

The line is:
*/function t(e){if(null===e||e===void 0)throw new TypeError('Object.assign cannot be called with null or undefined');return Object(e)}var a=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String('abc');if(e[5]='de','5'===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},a=0;10>a;a++)t['_'+String.fromCharCode(a)]=a;var n=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if('0123456789'!==n.join(''))return!1;var o={};return['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t'].forEach(function(e){o[e]=e}),'abcdefghijklmnopqrst'===Object.keys(Object.assign({},o)).join('')}catch(e){return!1}}()?Object.assign:function(e){for(var r=t(e),l=1,s,d;l<arguments.length;l++){for(var u in s=Object(arguments[l]),s)n.call(s,u)&&(r[u]=s[u]);if(a){d=a(s);for(var c=0;c<d.length;c++)o.call(s,d[c])&&(r[d[c]]=s[d[c]])}}return r}},function(e,t,a){'use strict';function n(e){return e&&e.__esModule?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}function r(e){if(Array.isArray(e)){for(var t=0,a=Array(e.length);t<e.length;t++)a[t]=e[t];return a}return Array.from(e)}function l(e){return function(t,a){e=e.map(k.default.normalize);var n=a(),o=(0,w.selectResolvingUris)(n),r=e.filter(function(e){return!o.includes(e)});if(0!==r.length){t({type:g.RESOLVE_URIS_STARTED,data:{uris:e}});var l={};v.default.resolve({uris:r}).then(function(e){var a=!0,n=!1,o;try{for(var r=Object.entries(e)[Symbol.iterator](),i;!(a=(i=r.next()).done);a=!0){var s=i.value,d=h(s,2),u=d[0],c=d[1],p=c&&!c.error?c:{claim:null,claims_in_channel:null,certificate:null},f=p.claim,m=p.certificate,_=p.claims_in_channel;l[u]={claim:f,certificate:m,claims_in_channel:_}}}catch(e){n=!0,o=e}finally{try{!a&&r.return&&r.return()}finally{if(n)throw o}}t({type:g.RESOLVE_URIS_COMPLETED,data:{resolveInfo:l}})})}}}function i(e){return l([e])}function s(e,t){return function(a,n){n();v.default.file_list({outpoint:t,full_status:!0}).then(function(o){var r=h(o,1),l=r[0];if(!l||0==l.written_bytes)setTimeout(function(){a(s(e,t))},G);else if(l.completed){a({type:g.DOWNLOADING_COMPLETED,data:{uri:e,outpoint:t,fileInfo:l}});var i=(0,D.selectBadgeNumber)(n());(0,F.default)(0===i?'':''+i);var d=(0,A.selectTotalDownloadProgress)(n());(0,U.default)(d);var u=new window.Notification('LBRY Download Complete',{body:l.metadata.stream.metadata.title,silent:!1});u.onclick=function(){Y.send('focusWindow','main')}}else{var c=l.total_bytes,p=l.written_bytes;a({type:g.DOWNLOADING_PROGRESSED,data:{uri:e,outpoint:t,fileInfo:l,progress:100*(p/c)}});var f=(0,A.selectTotalDownloadProgress)(n());(0,U.default)(f),setTimeout(function(){a(s(e,t))},G)}})}}function d(e,t){return function(a,n){var o=n();if(!t)throw new Error('outpoint is required to begin a download');var r=o.fileInfo.downloadingByOutpoint,l=r===void 0?{}:r;l[t]||v.default.file_list({outpoint:t,full_status:!0}).then(function(n){var o=h(n,1),r=o[0];a({type:g.DOWNLOADING_STARTED,data:{uri:e,outpoint:t,fileInfo:r}}),a(s(e,t))})}}function u(e,t){return function(a,n){n();a(d(e,t.outpoint)),T.default.call('file','view',{uri:e,outpoint:t.outpoint,claim_id:t.claim_id}).catch(function(){}),a((0,O.doClaimEligiblePurchaseRewards)())}}function c(e){return function(t,a){a();t({type:g.LOADING_VIDEO_STARTED,data:{uri:e}}),v.default.get({uri:e}).then(function(a){var n=null===a||'object'!==('undefined'==typeof a?'undefined':_(a))||'Timeout'==a.error;n?(t(m(null)),t({type:g.LOADING_VIDEO_FAILED,data:{uri:e}}),t((0,M.doOpenModal)(j.FILE_TIMEOUT,{uri:e}))):t(u(e,a))}).catch(function(){t(m(null)),t({type:g.LOADING_VIDEO_FAILED,data:{uri:e}}),t((0,M.doAlertError)('Failed to download '+e+', please try again. If this problem persists, visit https://lbry.io/faq/support for support.'))})}}function p(e){return function(t,a){function n(a){var n=1<arguments.length&&arguments[1]!==void 0?arguments[1]:null;0<a&&(!n||a>n)?t((0,M.doOpenModal)(j.AFFIRM_PURCHASE,{uri:e})):t(c(e))}var o=a(),r=(0,I.selectBalance)(o),l=(0,A.makeSelectFileInfoForUri)(e)(o),i=(0,A.selectDownloadingByOutpoint)(o),s=l&&!!i[l.outpoint];if(l&&l.completed)return l.written_bytes||t(c(e)),Promise.resolve();if(s)return Promise.resolve();var d=(0,R.makeSelectCostInfoForUri)(e)(o),u=d.cost;if(u>r)return t(m(null)),t((0,M.doOpenModal)(j.INSUFFICIENT_CREDITS)),Promise.resolve();if(0==u||!(0,N.makeSelectClientSetting)(b.INSTANT_PURCHASE_ENABLED)(o))n(u);else{var p=(0,N.makeSelectClientSetting)(b.INSTANT_PURCHASE_MAX)(o);'LBC'==p.currency?n(u,p.amount):T.default.getExchangeRates().then(function(e){var t=e.lbc_usd;n(u,p.amount/t)})}}}function f(){return function(e){e({type:g.FETCH_CLAIM_LIST_MINE_STARTED}),v.default.claim_list_mine().then(function(t){e({type:g.FETCH_CLAIM_LIST_MINE_COMPLETED,data:{claims:t}})})}}function m(e){return function(t){t({type:g.SET_PLAYING_URI,data:{uri:e}})}}Object.defineProperty(t,'__esModule',{value:!0});var _='function'==typeof Symbol&&'symbol'==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&'function'==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?'symbol':typeof e},h=function(){function e(e,t){var a=[],n=!0,o=!1,r;try{for(var l=e[Symbol.iterator](),i;!(n=(i=l.next()).done)&&(a.push(i.value),!(t&&a.length===t));n=!0);}catch(e){o=!0,r=e}finally{try{!n&&l['return']&&l['return']()}finally{if(o)throw r}}return a}return function(t,a){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,a);throw new TypeError('Invalid attempt to destructure non-iterable instance')}}();t.doResolveUris=l,t.doResolveUri=i,t.doFetchFeaturedUris=function(){return function(e,t){t();e({type:g.FETCH_FEATURED_CONTENT_STARTED});T.default.call('file','list_homepage').then(function(t){var a=t.Uris,n=[];for(var o in a)n=[].concat(r(n),r(a[o]));var i=[l(n),{type:g.FETCH_FEATURED_CONTENT_COMPLETED,data:{uris:a,success:!0}}];e(H.default.apply(void 0,i))},function(){e({type:g.FETCH_FEATURED_CONTENT_COMPLETED,data:{uris:{}}})})}},t.doFetchRewardedContent=function(){return function(e,t){var a=t();T.default.call('reward','list_featured').then(function(t){e({type:g.FETCH_REWARD_CONTENT_COMPLETED,data:{claimIds:Object.values(t),success:!0}})},function(){e({type:g.FETCH_REWARD_CONTENT_COMPLETED,data:{claimIds:[],success:!1}})})}},t.doUpdateLoadStatus=s,t.doStartDownload=d,t.doDownloadFile=u,t.doLoadVideo=c,t.doPurchaseUri=p,t.doFetchClaimsByChannel=function(e,t){return function(a){a({type:g.FETCH_CHANNEL_CLAIMS_STARTED,data:{uri:e,page:t}}),v.default.claim_list_by_channel({uri:e,page:t||1}).then(function(t){var n=t[e]||{},o=n.claims_in_channel,r=n.returned_page;a({type:g.FETCH_CHANNEL_CLAIMS_COMPLETED,data:{uri:e,claims:o||[],page:r||void 0}})})}},t.doFetchClaimCountByChannel=function(e){return function(t){t({type:g.FETCH_CHANNEL_CLAIM_COUNT_STARTED,data:{uri:e}}),v.default.claim_list_by_channel({uri:e}).then(function(a){var n=a[e],o=n?n.claims_in_channel:0;t({type:g.FETCH_CHANNEL_CLAIM_COUNT_COMPLETED,data:{uri:e,totalClaims:o}})})}},t.doFetchClaimListMine=f,t.doPlayUri=function(e){return function(t){t(m(e)),t(p(e))}},t.doSetPlayingUri=m,t.doFetchChannelListMine=function(){return function(e){e({type:g.FETCH_CHANNEL_LIST_MINE_STARTED});v.default.channel_list_mine().then(function(t){e({type:g.FETCH_CHANNEL_LIST_MINE_COMPLETED,data:{claims:t}})})}},t.doCreateChannel=function(e,t){return function(a){return a({type:g.CREATE_CHANNEL_STARTED}),new Promise(function(n,o){v.default.channel_new({channel_name:e,amount:parseFloat(t)}).then(function(t){t.name=e,a({type:g.CREATE_CHANNEL_COMPLETED,data:{channelClaim:t}}),n(t)},function(e){o(e)})})}},t.doPublish=function(e){return function(t){return new Promise(function(a,n){v.default.publishDeprecated(e,null,function(e){a(e),!0===e?t(f()):setTimeout(function(){return t(f())},2e4,{once:!0})},function(e){return n(e)})})}},t.doAbandonClaim=function(e,t){return function(a,n){var o=n(),r=(0,I.selectTransactionItems)(o),l=r.find(function(a){return a.txid==e&&a.nout==t}),s=l.claim_id

Steps to reproduce

  1. go to claim page for claim you own
  2. remove > abandon uri
  3. cannot click away from modal

System Configuration

  • LBRY Daemon version:
  • LBRY App version:
  • LBRY Installation ID:
  • Operating system:

Anything Else

Screenshots

@lyoshenka lyoshenka closed this Dec 11, 2017

@tzarebczan

This comment has been minimized.

Show comment
Hide comment
@tzarebczan

tzarebczan Dec 12, 2017

Member

@hackrush01 this is still happening if you try to remove the claim in the same session it was published in (i.e. without restart LBRY). There's got to be some type of initialization/timing issue.

Here's the latest error:

Uncaught TypeError: Cannot read property 'claim_id' of undefined
    at file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:1:41637
    at C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\redux-thunk\lib\index.js:11:18
    at dispatch (C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\redux\lib\applyMiddleware.js:45:18)
    at file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:1:91094
    at file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:1:111084
    at Array.map (native)
    at file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:1:111061
    at C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\redux-thunk\lib\index.js:14:16
    at dispatch (C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\redux\lib\applyMiddleware.js:45:18)
    at file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:1:91931
    at C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\redux-thunk\lib\index.js:11:18
    at deleteFile (file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:12:91184)
    at onConfirmed (file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:12:92973)
    at HTMLUnknownElement.callCallback (C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:542:14)
    at Object.invokeGuardedCallbackDev (C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:581:16)
    at Object.invokeGuardedCallback (C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:438:27)
Member

tzarebczan commented Dec 12, 2017

@hackrush01 this is still happening if you try to remove the claim in the same session it was published in (i.e. without restart LBRY). There's got to be some type of initialization/timing issue.

Here's the latest error:

Uncaught TypeError: Cannot read property 'claim_id' of undefined
    at file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:1:41637
    at C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\redux-thunk\lib\index.js:11:18
    at dispatch (C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\redux\lib\applyMiddleware.js:45:18)
    at file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:1:91094
    at file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:1:111084
    at Array.map (native)
    at file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:1:111061
    at C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\redux-thunk\lib\index.js:14:16
    at dispatch (C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\redux\lib\applyMiddleware.js:45:18)
    at file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:1:91931
    at C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\redux-thunk\lib\index.js:11:18
    at deleteFile (file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:12:91184)
    at onConfirmed (file:///C:/Program%20Files%20(x86)/LBRY/resources/app.asar/renderer.js:12:92973)
    at HTMLUnknownElement.callCallback (C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:542:14)
    at Object.invokeGuardedCallbackDev (C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:581:16)
    at Object.invokeGuardedCallback (C:\Program Files (x86)\LBRY\resources\app.asar\node_modules\react-dom\cjs\react-dom.development.js:438:27)
@hackrush01

This comment has been minimized.

Show comment
Hide comment
@hackrush01

hackrush01 Dec 12, 2017

Member
Member

hackrush01 commented Dec 12, 2017

@kauffj

This comment has been minimized.

Show comment
Hide comment
@kauffj

kauffj Dec 12, 2017

Member

@hackrush01 I'm for dropping name from claim_abandon, but does it even accept it currently?

I'd be against dropping claim_id. It makes sense for claim_abandon to take this. If it's an issue of lbryum not knowing about claim ids, this can presumably be handled by the daemon, right? A mapping from claim_id to an outpoint should be directly available in the claim table of the lbry db.

Member

kauffj commented Dec 12, 2017

@hackrush01 I'm for dropping name from claim_abandon, but does it even accept it currently?

I'd be against dropping claim_id. It makes sense for claim_abandon to take this. If it's an issue of lbryum not knowing about claim ids, this can presumably be handled by the daemon, right? A mapping from claim_id to an outpoint should be directly available in the claim table of the lbry db.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment