OkunaOrg / okuna-api

🤖 The Okuna Social Network API
https://okuna.io
MIT License
239 stars 81 forks source link

Issues on the Community Guidelines #724

Open Hansmic opened 4 years ago

Hansmic commented 4 years ago

For some reason am getting bad request on the community guidelines, pleas what am l doing wrong. @Komposten @uiboy

Simulator Screen Shot - iPhone 11 Pro Max - 2020-06-29 at 10 59 43

Komposten commented 4 years ago

I'm having some issues with Docker at the moment so I can't start a server up to test this myself. However, a quick look in the code of the app tells me that the guidelines are fetched directly from https://okunaorg.github.io/okuna-api/COMMUNITY_GUIDELINES.md rather than from the API server. I suggest that you look at logcat/terminal to see if any errors are printed, or run the app in debug mode with a breakpoint in the DocumentsService.

Presumably, the GET request to okunaorg.github.io fails, possibly due to some content policy restrictions or something. Hopefully you should find some error message giving more details.

Hansmic commented 4 years ago

@Komposten, thanks for getting back to me, First workaround was trying to GET request from different ...github.io's, all resulted with the same outcome. Tried having the breakpoint in the debug mode in the DocumentsService, it then referenced me httpie.dart pointing out this

 void setMagicHeader(String name, String value) {
    magicHeaderName = name;
    magicHeaderValue = value;
  }
 try {
      String communityGuidelines =
          await _documentsService.getComm unityGuidelines();
      _setCommunityGuidelines(communityGuidelines);
    } catch (error) {

from the guidelines_step.dart

Does that have to do with https://contenttproxy.okuna.io in the env.json

Komposten commented 4 years ago

@Komposten, thanks for getting back to me, First workaround was trying to GET request from different ...github.io's, all resulted with the same outcome. Tried having the breakpoint in the debug mode in the DocumentsService, it then referenced me httpie.dart pointing out this

 void setMagicHeader(String name, String value) {
    magicHeaderName = name;
    magicHeaderValue = value;
  }

setMagicHeader shouldn't have anything to do with this. Okuna doesn't use any magic headers anymore (if you have a magic header specified in your .env.json file then you can most likely remove that, unless your environment requires its existence for some reason).

Does that have to do with https://contenttproxy.okuna.io in the env.json

The proxy is only used for link previews, as fas as I know. So it should have no effect here.


As asked previously, are you getting any error messages in the terminal or logcat which relate to the loading of the community guidelines?

If you break at the point I indicated and step forward until you reach line 238 in httpie.dart (or line 235 if an error occurs) you can then inspect the content of the response and see if it gives any more information.

Hansmic commented 4 years ago

@Komposten Hello from my terminal messages

OneSignal has detected that your application delegate implements a deprecated method (application:didReceiveLocalNotification:). Please note that this method has been officially deprecated and the OneSignal SDK will no longer call it. You should use UNUserNotificationCenter instead
flutter: Setting localisation service with en
flutter: Clearing prompted user for permission
flutter: Clearing /tmp files and vimedia
)
)
)
)
ERROR: HTTP Request (OSRequestRegisterUser) must contain app_id parameter
Request <OSRequestRegisterUser: 0x6000019d4f30> fail result error Error Domain=OneSignalError Code=-1 "(null)" UserInfo={error=HTTP Request (OSRequestRegisterUser) must contain app_id parameter}
ERROR: Encountered error during push registration with OneSignal: Error Domain=OneSignalError Code=-1 "(null)" UserInfo={error=HTTP Request (OSRequestRegisterUser) must contain app_id parameter}
ERROR: Encountered error during email registration with OneSignal: (null)

attached the screenshot

Screen Shot 2020-07-01 at 12 45 14 PM
Hansmic commented 4 years ago

@Komposten any light on this issue, Please

Komposten commented 4 years ago

Unfortunately not. I can't reproduce it on my end, and without an error message or anything from your side there isn't really much I can do at this point (the OneSignal errors from your log should not be related, since that's the notification system which doesn't manage to connect).

Hansmic commented 4 years ago

@Komposten Please you have any thought it might be coming from http, since am not using https, cos having be reading why api which are hosted on http never fetched data. and do you have your on http or https Thank,

Hansmic commented 4 years ago

@Komposten Hello, please do you have any ideal how the Request an invite works and how is it connected to the backend? Thanks.

Komposten commented 4 years ago

@Komposten Please you have any thought it might be coming from http, since am not using https, cos having be reading why api which are hosted on http never fetched data. and do you have your on http or https Thank,

Since the Community Guidelines are pulled directly from Github the issue should be unrelated to the Okuna API.

@Komposten Hello, please do you have any ideal how the Request an invite works and how is it connected to the backend? Thanks.

When you request an invite via the app, the e-mail you enter is sent to the backend's /waitlist/subscribe route.


I should mention that I'm a front-end guy. I've barely worked on the API at all, so my knowledge on how it works is highly limited.

Hansmic commented 4 years ago

@Komposten thanks for your assistance, l do have a question pertaining on "Report post" please do you know which file is associated with that. cos clicking on it redirect me to spinning page saying "why are you reporting this post?" without doing nothing. Thanks