[GH-ISSUE #206] Cannot expand folder #170

Closed
opened 2026-02-25 21:34:20 +03:00 by kerem · 6 comments
Owner

Originally created by @hartois on GitHub (Jun 19, 2017).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/206

Originally assigned to: @jasonmunro on GitHub.

In one of the accounts (Office 365) I cannot expand folder in the folders list.
I see "+" near folder, after clicking on it icon changed to "-", but subfolders are not displayed.
In web console I see request:

page:message_list
list_path:imap_1_494e424f58
Form Data
view source
view URL encoded
hm_ajax_hook:ajax_imap_folder_expand
imap_server_id:1
folder:4172636869766573
hm_page_key:dbbf0d72bdfd3ec61571b5f9730c33b32bff1895075f3f4f8ffd1baf29929ea5

and response:

{"date":"5:07:30","imap_expanded_folder_path":"imap_1_4172636869766573","router_login_state":true,"router_user_msgs":{}}

After clicking on "-" visualy nothing happens, but I see request:

page:message_list
list_path:imap_1_494e424f58
Form Data
view source
view URL encoded
hm_ajax_hook:ajax_imap_folder_expand
imap_server_id:1
folder:4172636869766573
hm_page_key:dbbf0d72bdfd3ec61571b5f9730c33b32bff1895075f3f4f8ffd1baf29929ea5

and response:

{"date":"5:09:11","imap_expanded_folder_path":"imap_1_4172636869766573","router_login_state":true,"router_user_msgs":{}}

Re-creating account not solved problem.
How can I debug this problem?

Originally created by @hartois on GitHub (Jun 19, 2017). Original GitHub issue: https://github.com/cypht-org/cypht/issues/206 Originally assigned to: @jasonmunro on GitHub. In one of the accounts (Office 365) I cannot expand folder in the folders list. I see "+" near folder, after clicking on it icon changed to "-", but subfolders are not displayed. In web console I see request: ``` page:message_list list_path:imap_1_494e424f58 Form Data view source view URL encoded hm_ajax_hook:ajax_imap_folder_expand imap_server_id:1 folder:4172636869766573 hm_page_key:dbbf0d72bdfd3ec61571b5f9730c33b32bff1895075f3f4f8ffd1baf29929ea5 ``` and response: ``` {"date":"5:07:30","imap_expanded_folder_path":"imap_1_4172636869766573","router_login_state":true,"router_user_msgs":{}} ``` After clicking on "-" visualy nothing happens, but I see request: ``` page:message_list list_path:imap_1_494e424f58 Form Data view source view URL encoded hm_ajax_hook:ajax_imap_folder_expand imap_server_id:1 folder:4172636869766573 hm_page_key:dbbf0d72bdfd3ec61571b5f9730c33b32bff1895075f3f4f8ffd1baf29929ea5 ``` and response: ``` {"date":"5:09:11","imap_expanded_folder_path":"imap_1_4172636869766573","router_login_state":true,"router_user_msgs":{}} ``` Re-creating account not solved problem. How can I debug this problem?
kerem 2026-02-25 21:34:20 +03:00
  • closed this issue
  • added the
    bug
    imap
    labels
Author
Owner

@jasonmunro commented on GitHub (Jun 19, 2017):

To debug this, we need to put Cypht into "debug" mode, and apply the following patch:

https://gist.github.com/jasonmunro/1ed2dc0d0df7d843a9240efdcf5221e5

This will output the IMAP conversation which should provide a clue as to what is going wrong. To put Cypht in debug mode, see section 6 of the install page (https://cypht.org/install.html). The output will be sent to wherever PHP is configured to log to. Keep in mind that folder lists are cached, so this will only output information the first time you try to expand the folder after login. Subsequent attempts will not connect to the IMAP server.

<!-- gh-comment-id:309458987 --> @jasonmunro commented on GitHub (Jun 19, 2017): To debug this, we need to put Cypht into "debug" mode, and apply the following patch: https://gist.github.com/jasonmunro/1ed2dc0d0df7d843a9240efdcf5221e5 This will output the IMAP conversation which should provide a clue as to what is going wrong. To put Cypht in debug mode, see section 6 of the install page (https://cypht.org/install.html). The output will be sent to wherever PHP is configured to log to. Keep in mind that folder lists are cached, so this will only output information the first time you try to expand the folder after login. Subsequent attempts will not connect to the IMAP server.
Author
Owner

@hartois commented on GitHub (Jun 19, 2017):

2017/06/19 20:09:07 [error] 636#0: *26232 FastCGI sent in stderr: "PHP message: string: LIST "logs/%" "%"

PHP message: Array
(
    [0] => Array
        (
            [0] => A5
            [1] => OK
            [2] => LIST
            [3] => completed.
        )

)

PHP message: Array
(
    [0] => Using Hm_PHP_Session with Hm_Auth_Dynamic
    [1] => Using file based user configuration
    [2] => Using sapi: fpm-fcgi
    [3] => Request type: AJAX
    [4] => Request path: /
    [5] => TLS request: 1
    [6] => Mobile request: 0
    [7] => Page ID: ajax_imap_folder_expand
    [8] => Memcached enabled but not supported by PHP
    [9] => IMAP cache miss from Memcached
    [10] => ELOG called in /var/www/cypht/modules/imap/hm-imap.php at line 392
    [11] => ELOG called in /var/www/cypht/modules/imap/hm-imap.php at line 393
    [12] => PHP version 7.1.6
    [13] => Zend version 3.1.0
    [14] => Peak Memory: 2048
    [15] => PID: 12133
    [16] => Included files: 63
)
<!-- gh-comment-id:309505578 --> @hartois commented on GitHub (Jun 19, 2017): ``` 2017/06/19 20:09:07 [error] 636#0: *26232 FastCGI sent in stderr: "PHP message: string: LIST "logs/%" "%" PHP message: Array ( [0] => Array ( [0] => A5 [1] => OK [2] => LIST [3] => completed. ) ) PHP message: Array ( [0] => Using Hm_PHP_Session with Hm_Auth_Dynamic [1] => Using file based user configuration [2] => Using sapi: fpm-fcgi [3] => Request type: AJAX [4] => Request path: / [5] => TLS request: 1 [6] => Mobile request: 0 [7] => Page ID: ajax_imap_folder_expand [8] => Memcached enabled but not supported by PHP [9] => IMAP cache miss from Memcached [10] => ELOG called in /var/www/cypht/modules/imap/hm-imap.php at line 392 [11] => ELOG called in /var/www/cypht/modules/imap/hm-imap.php at line 393 [12] => PHP version 7.1.6 [13] => Zend version 3.1.0 [14] => Peak Memory: 2048 [15] => PID: 12133 [16] => Included files: 63 ) ```
Author
Owner

@jasonmunro commented on GitHub (Jun 19, 2017):

Thanks for the feedback. Unfortunately this is not what I was hoping for :) According to this we are requesting the sub-folders under logs (only 1 level deep, not sub-folders of sub-folders) with this command:

LIST "logs/%" "%"

And the server is responding with "OK", so the command format is correct, it is just telling us no sub-folders exist under that parent folder.

Do you see sub-folders like this in other clients? Some desktop clients create "local" folders instead of on the IMAP server itself, which might explain why they are not showing up. I will need to test Office 365 specifically to see if I can reproduce the problem.

<!-- gh-comment-id:309513965 --> @jasonmunro commented on GitHub (Jun 19, 2017): Thanks for the feedback. Unfortunately this is not what I was hoping for :) According to this we are requesting the sub-folders under logs (only 1 level deep, not sub-folders of sub-folders) with this command: LIST "logs/%" "%" And the server is responding with "OK", so the command format is correct, it is just telling us no sub-folders exist under that parent folder. Do you see sub-folders like this in other clients? Some desktop clients create "local" folders instead of on the IMAP server itself, which might explain why they are not showing up. I will need to test Office 365 specifically to see if I can reproduce the problem.
Author
Owner

@hartois commented on GitHub (Jun 19, 2017):

Folder "logs" contain two subfolders: "mail logs" and "shrek".
From Rainloop client:
13ckmtf

<!-- gh-comment-id:309516476 --> @hartois commented on GitHub (Jun 19, 2017): Folder "logs" contain two subfolders: "mail logs" and "shrek". From Rainloop client: ![13ckmtf](https://user-images.githubusercontent.com/11641656/27298383-14af70d4-5531-11e7-9616-bc312cb09c6e.png)
Author
Owner

@jasonmunro commented on GitHub (Jun 19, 2017):

Looks like exchange does not like the trailing '%' character on the folder name. Removing that seems to have fixed the issue for me. Could you update, logout and back in, and see if the problem is resolved for you? Thanks!

<!-- gh-comment-id:309523827 --> @jasonmunro commented on GitHub (Jun 19, 2017): Looks like exchange does not like the trailing '%' character on the folder name. Removing that seems to have fixed the issue for me. Could you update, logout and back in, and see if the problem is resolved for you? Thanks!
Author
Owner

@hartois commented on GitHub (Jun 19, 2017):

This solved problem. Thanks

<!-- gh-comment-id:309524941 --> @hartois commented on GitHub (Jun 19, 2017): This solved problem. Thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#170
No description provided.