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

GetProjectAsync not work #94

Closed
trinhbaan24 opened this issue Jul 13, 2018 · 8 comments
Closed

GetProjectAsync not work #94

trinhbaan24 opened this issue Jul 13, 2018 · 8 comments
Assignees

Comments

@trinhbaan24
Copy link

trinhbaan24 commented Jul 13, 2018

@ats124
now, backlog4net not working

error: backlog api request failed
Backlog4net.BacklogApiException' occurred in XXX.exe but was not handled in user code

場所 Backlog4net.Http.BacklogHttpClient.d__14.MoveNext()
--- 直前に例外がスローされた場所からのスタック トレースの終わり ---
場所 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
場所 Backlog4net.BacklogClientImpl.d__22.MoveNext()
--- 直前に例外がスローされた場所からのスタック トレースの終わり ---
場所 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
場所 Backlog4net.BacklogClientImpl.d__93.MoveNext()
--- 直前に例外がスローされた場所からのスタック トレースの終わり ---
場所 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
場所 System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()

@ats124
Copy link
Owner

ats124 commented Jul 18, 2018

Thanks for the report. I'll check it.

@ats124
Copy link
Owner

ats124 commented Jul 18, 2018

@trinhbaan24 I checked it but it worked in my environment. Does other methods work?

@trinhbaan24
Copy link
Author

@ats124

this is my source code. other methods is not work too. does this code true?

`Imports Backlog4net
Imports Backlog4net.Api.Option
Imports Backlog4net.Conf

Module C00_E00XF
'*******************************************************************************
#Region ""
#End Region
'#Region "MAIN"
Sub Main()
Dim task = New Task(AddressOf ProcessDataAsync)
' Start and wait for task to end.
task.Start()
task.Wait()

    Console.ReadLine()
End Sub

Async Sub ProcessDataAsync()

    Dim conf As New BacklogJpConfigure("chiyotest") 'spaceKey
    conf.ApiKey = "ICESrRCu3LmGPNtJIwA6cyndnFsDNeiopFJP1QltR5rWB0RKvcCFiY9G7n1gKdrh"
    Dim backlogClient = New BacklogClientFactory(conf).NewClient()
    Try
        Dim project = Await backlogClient.GetProjectAsync("T_CHIYODA")
        Console.WriteLine("Please wait, processing find projectId")
        Dim projectId = project.Id

        Dim listIssue = Await backlogClient.GetIssuesAsync(New GetIssuesParams(projectId))
        Console.WriteLine("Please wait, processing")


        Console.WriteLine("Count: " + listIssue.Count.ToString)
    Catch ex As Exception
        MessageBox.Show(ex.Message)
    End Try

End Sub`

@ats124
Copy link
Owner

ats124 commented Jul 19, 2018

@trinhbaan24

Your program worked in my environment.

The results are as follows

Please wait, processing find projectId
Please wait, processing
Count: 20

However, asynchronous methods are incorrectly used, which may cause problems.

Can not set asynchronous method in Task constructor argument.

Dim task = New Task(AddressOf ProcessDataAsync)

Please try to see if the following program works properly.

    Sub Main()
        ProcessDataAsync().Wait()
        Console.ReadLine()
    End Sub

    Async Function ProcessDataAsync() As Task
        Dim conf As New BacklogJpConfigure("chiyotest") 'spaceKey
        conf.ApiKey = "ICESrRCu3LmGPNtJIwA6cyndnFsDNeiopFJP1QltR5rWB0RKvcCFiY9G7n1gKdrh"
        Dim backlogClient = New BacklogClientFactory(conf).NewClient()
        Try
            Dim project = Await backlogClient.GetProjectAsync("T_CHIYODA")
            Console.WriteLine("Please wait, processing find projectId")
            Dim projectId = project.Id

            Dim listIssue = Await backlogClient.GetIssuesAsync(New GetIssuesParams(projectId))
            Console.WriteLine("Please wait, processing")


            Console.WriteLine("Count: " + listIssue.Count.ToString)
        Catch ex As Exception
            Console.WriteLine(ex.Message)
        End Try
    End Function

@trinhbaan24
Copy link
Author

trinhbaan24 commented Jul 20, 2018

Backlog4net.zip
@ats124

thank for your comfirm.
However,it not worked in my environment.
image

can you send to me your Backlog4net.dll?
please!

@ats124 ats124 self-assigned this Jul 20, 2018
@ats124
Copy link
Owner

ats124 commented Jul 20, 2018

@trinhbaan24
I will share the Visual Studio 2017 Project with you built and executed your source code.

Please download here.
https://www.dropbox.com/s/onar9ar8oatck6n/ConsoleApp1.zip?dl=1

@trinhbaan24
Copy link
Author

@ats124

thank you very much
it is worked.

@ats124
Copy link
Owner

ats124 commented Jul 23, 2018

@trinhbaan24
That's good.
I close this issue.

@ats124 ats124 closed this as completed Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants