fossasia / open-event-organizer-android

Open Event Mobile App for Organizers and Entry Managers https://play.google.com/store/apps/details?id=com.eventyay.organizer
Apache License 2.0
1.79k stars 490 forks source link

Bug: HTTP 422 UNPROCESSABLE ENTITY in Creating Events #837

Closed dr0pdb closed 6 years ago

dr0pdb commented 6 years ago

Is it a ?

Bug Report

Actual Behaviour

HTTP 422 UNPROCESSABLE ENTITY when creating Events

Expected Behaviour

The Event should be created successfully

Steps to reproduce it

Try creating a new event.

LogCat for the issue

03-25 12:15:13.651 1186-1271/org.fossasia.eventyay D/OkHttp: {"jsonapi": {"version": "1.0"}, "errors": [{"status": "422", "detail": "Field may not be null.", "source": {"pointer": "/data/attributes/privacy"}, "title": "Validation error"}, {"status": "422", "detail": "Must include a `data` key", "source": {"pointer": "/data/relationships/tickets/data"}, "title": "Validation error"}, {"status": "422", "detail": "Must include a `data` key", "source": {"pointer": "/data/relationships/faqs/data"}, "title": "Validation error"}]}
03-25 12:15:13.651 1186-1271/org.fossasia.eventyay D/OkHttp: <-- END HTTP (467-byte body)
03-25 12:15:13.701 1186-1186/org.fossasia.eventyay E/Logger: An exception occurred : HTTP 422 UNPROCESSABLE ENTITY
                                                             retrofit2.adapter.rxjava2.HttpException: HTTP 422 UNPROCESSABLE ENTITY
                                                                 at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:54)
                                                                 at retrofit2.adapter.rxjava2.BodyObservable$BodyObserver.onNext(BodyObservable.java:37)
                                                                 at retrofit2.adapter.rxjava2.CallExecuteObservable.subscribeActual(CallExecuteObservable.java:43)
                                                                 at io.reactivex.Observable.subscribe(Observable.java:11442)
                                                                 at retrofit2.adapter.rxjava2.BodyObservable.subscribeActual(BodyObservable.java:34)
                                                                 at io.reactivex.Observable.subscribe(Observable.java:11442)
                                                                 at io.reactivex.internal.operators.observable.ObservableDoOnEach.subscribeActual(ObservableDoOnEach.java:42)
                                                                 at io.reactivex.Observable.subscribe(Observable.java:11442)
                                                                 at io.reactivex.internal.operators.observable.ObservableSubscribeOn$SubscribeTask.run(ObservableSubscribeOn.java:96)
                                                                 at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:571)
                                                                 at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
                                                                 at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
                                                                 at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
                                                                 at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
                                                                 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1115)
                                                                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:590)
                                                                 at java.lang.Thread.run(Thread.java:818)

Screenshots of the issue

videotogif_2018 03 25_12 20 18

Android version and Phone Model

Android 5.1.1 Oppo f1

Would you like to work on the issue?

Yes But after previously assigned ones. Please comment if you want to work on this.

sridharjajoo commented 6 years ago

@iamareebjamal I would like to work on this issue. How should I start with it?

iamareebjamal commented 6 years ago

Look at the logs, server is rejecting the generated JSON. Check why and mitigate those issues