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

Message "did not find the value of the request" addAttachmentToCard ". #241

Closed
463728946 opened this issue Jul 13, 2018 · 7 comments
Closed

Message "did not find the value of the request" addAttachmentToCard ". #241

463728946 opened this issue Jul 13, 2018 · 7 comments
Assignees
Labels
bug

Comments

@463728946
Copy link

@463728946 463728946 commented Jul 13, 2018

TrelloAuthorization.Default.AppKey = appKey;
TrelloAuthorization.Default.UserToken = token;
TrelloFactory factory = new TrelloFactory();
try
{
var me = await factory.Me();
await me.Refresh();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

@gregsdennis

This comment has been minimized.

Copy link
Owner

@gregsdennis gregsdennis commented Jul 13, 2018

Thanks for reporting.

Can you provide a few more details? What kind of exception was caught? Can you post the stack trace? Were you able to capture the network traffic, by chance?

If you need to supply sensitive information, you can message me directly in Slack. There's a link at the top of the README.

@gregsdennis gregsdennis self-assigned this Jul 13, 2018
@463728946

This comment has been minimized.

Copy link
Author

@463728946 463728946 commented Jul 13, 2018

Sorry , My english is so bad!!!

This is Form1.cs, Error at await me.Refresh();

using Manatee.Trello;
using System;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace LoadPoints
{
    public partial class Form1 : Form
    {
        private const string token = "";
        private const string AppKey = "";
        private TrelloFactory factory;

        public Form1()
        {
            InitializeComponent();
            TrelloAuthorization.Default.AppKey = AppKey;
            TrelloAuthorization.Default.UserToken = token;
            factory = new TrelloFactory();
            GetBoardsAsync();
        }


        private async Task GetBoardsAsync()
        {
            try
            {
                var me = await factory.Me();
                await me.Refresh();
                
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
}

-------stack trace??---

LoadPoints.exe!LoadPoints.Form1.GetBoardsAsync() 行 33 C#
[正在恢复异步方法]
[外部代码]
Manatee.Trello.dll!Manatee.Trello.Internal.Synchronization.SynchronizationContext.Synchronize(bool force, System.Threading.CancellationToken ct) 行 71 C#
[正在恢复异步方法]
[外部代码]
Manatee.Trello.dll!Manatee.Trello.Internal.Synchronization.SynchronizationContext<Manatee.Trello.Json.IJsonMember>.GetBasicData(System.Threading.CancellationToken ct) 行 201 C#
[正在恢复异步方法]
[外部代码]
Manatee.Trello.dll!Manatee.Trello.Internal.Synchronization.SynchronizationContext<Manatee.Trello.Json.IJsonMember>.GetData(System.Threading.CancellationToken ct) 行 182 C#
[正在恢复异步方法]
[外部代码]
Manatee.Trello.dll!Manatee.Trello.Internal.DataAccess.JsonRepository.Execute<Manatee.Trello.Json.IJsonMember>(Manatee.Trello.TrelloAuthorization auth, Manatee.Trello.Internal.DataAccess.Endpoint endpoint, System.Threading.CancellationToken ct, System.Collections.Generic.IDictionary<string, object> parameters) 行 22 C#
[正在恢复异步方法]
[外部代码]
Manatee.Trello.dll!Manatee.Trello.Internal.DataAccess.JsonRepository.ProcessRequest<Manatee.Trello.Json.IJsonMember>(Manatee.Trello.Rest.IRestRequest request, System.Threading.CancellationToken ct) 行 72 C#
[正在恢复异步方法]
[外部代码]
LoadPoints.exe!LoadPoints.Program.Main() 行 19 C#

@gregsdennis

This comment has been minimized.

Copy link
Owner

@gregsdennis gregsdennis commented Jul 14, 2018

I'm sorry, but I haven't been able to reproduce any kind of error. Can you send me the exact text of the error? I don't recognize the message in the issue title.

However, this line

GetBoardsAsync();

doesn't complete execution. You need to call .Wait() on it, like this:

GetBoardsAsync().Wait();

Lastly, you don't need to refresh a Me object right away because getting it from the factory actually downloads all of the data a refresh would download. The refresh is redundant for TrelloFactory.Me().


(via Google translate, 我希望这有效)

对不起,我无法重现任何错误。 你能把错误的确切文字发给我吗? 我不承认问题标题中的消息。

但是,这行代码

GetBoardsAsync();

没有完成执行。 你需要在它上面调用.Wait(),如下所示:

GetBoardsAsync().Wait();

最后,您不需要立即刷新Me对象,因为从工厂获取它实际上会下载刷新下载的所有数据。 对于TrelloFactory.Me(),刷新是多余的。

@463728946

This comment has been minimized.

Copy link
Author

@463728946 463728946 commented Jul 14, 2018

Thank you very much for your answer. I want to get all the information in my card.

[Sample included by @463728946, then deleted by @gregsdennis]

@gregsdennis

This comment has been minimized.

Copy link
Owner

@gregsdennis gregsdennis commented Jul 14, 2018

Thanks for that. It seems you've discovered a new notification type. I'll have to add it. I'll scan the response I get from your sample for any other I may have missed. I should have a fix out this weekend.

I've edited your comment to remove the sample. You may want to go onto your Trello settings page and delete that token.

@gregsdennis

This comment has been minimized.

Copy link
Owner

@gregsdennis gregsdennis commented Jul 14, 2018

Please see v3.2.1. It should be on Nuget soon.

@463728946

This comment has been minimized.

Copy link
Author

@463728946 463728946 commented Jul 16, 2018

thx, it's working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.